pip路径与模块搜索路径不匹配

时间:2015-10-11 07:38:24

标签: python pip python-import

pip正在安装到' /usr/local/lib/python2.7/site-packages',但该路径不在sys.path中。如何永久告诉python从这里加载包?对于临时解决方案,我已尝试sys.path.append('/usr/local/lib/python2.7/site-packages'),但这没有效果。

编辑:我的错误消息

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip_build_<user>/numpy-stl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip-59wzi0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip_build_<user>/numpy-stl
Storing debug log for failure in /Users/<user>/Library/Logs/pip.log

0 个答案:

没有答案