我已在本地路径~/.local/lib/python2.7/site-packages/scipy
但是我遇到了类型
的导入问题来自scipy import linalg
Traceback (most recent call last):
File "scipy2.py", line 1, in <module>
from scipy import linalg
ImportError: cannot import name linalg
我对python有基本经验,因此无法确定这些导入的实际效果。
在网上搜索我认为以下脚本显示了导入路径
import sys
for path in sys.path:
print path
输出:
/home/fliu/workspace/python
/home/fliu/.local/lib/python2.7/site-packages/setuptools-19.4-py2.7.egg
/home/fliu/.local/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg
/home/fliu/.local/lib/python2.7/site-packages/swiglpk-1.0.0-py2.7-linux-x86_64.egg
/usr/lib64/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-dynload
/home/fliu/.local/lib/python2.7/site-packages
/usr/lib64/python2.7/site-packages
/usr/lib/python2.7/site-packages
ls~ / .local / lib / python2.7 / site-packages / scipy
BENTO_BUILD.txt __config__.pyc __init__.py interpolate linalg odr setup.pyc special version.pyc
_build_utils constants __init__.pyc io linalg.pxd optimize signal stats weave
cluster fftpack INSTALL.rst.txt _lib misc pip-delete-this-directory.txt sparse THANKS.txt
__config__.py HACKING.rst.txt integrate LICENSE.txt ndimage setup.py spatial version.py
可能出错?