我想简单地安装一个新模块。但它一直给我错误。我在Mac上有python27和python36。发生这种情况时,我正在使用python27。我无法运行pip或conda。
我运行后:pip安装区域
我收到了这些错误:
dyld: Library not loaded: @rpath/libpython3.6m.dylib
Referenced from: /Users/yan/anaconda/bin/python
Reason: no suitable image found. Did find:
/Users/yan/anaconda/bin/../lib/libpython3.6m.dylib: file too short
Abort trap: 6
另一个相关的问题,如果我在使用python36时安装了一些模块,我可以在python27中导入这些吗?我需要重新安装吗?谢谢!!!
不幸的是,并非所有模块都与Anaconda Python兼容(正如我从日志中看到的那样,你可以使用它)。像virtualenv
这样的问题也出现了。但regions
文件表明the way to install它与conda
。
使用conda要从anaconda.org上的astropy通道安装带Anaconda的区域,只需运行:
conda install -c astropy regions
关于第二个问题 - 不,应该为Python 2和3单独安装模块