Python 显示 'library not loaded'
Python shows 'library not loaded'
我正在尝试简单地安装一个新模块。但它一直给我错误。我在 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
文档用 conda
.
指示 the way to install 它
Using conda To install regions with Anaconda from the astropy channel
on anaconda.org simply run:
conda install -c astropy regions
关于第二个问题 - 不,应该为 Python 2 和 3
单独安装模块
我正在尝试简单地安装一个新模块。但它一直给我错误。我在 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
文档用 conda
.
Using conda To install regions with Anaconda from the astropy channel on anaconda.org simply run:
conda install -c astropy regions
关于第二个问题 - 不,应该为 Python 2 和 3
单独安装模块