更新之前我的mac配置一次python。我不知道如何创建配置。更新后,python解释器无法看到旧包。我发现3个目录: 首先 /Library/Python/2.7/site-packages / http://yadi.sk/d/GbD6sS7LMZ78Z 辅助 /图书馆/框架/ http://yadi.sk/d/5DMN-bd3MZBnT 也许我的旧pycharm项目: / Users / myuser / Python / http://yadi.sk/d/nvo67PLnMZDeV
Python路径变量:
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>>> pprint.pprint(sys.path)
['',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sorl_watermark-0.0.1-py2.7.egg',
'/Library/Python/2.7/site-packages',
'/Library/Python/2.7/site-packages/setuptools-3.4.4-py2.7.egg',
'/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/Users/myuser/Library/Python/2.7/lib/python/site-packages',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages']
>>>
系统路径:
echo $PATH
/Library/Frameworks/Python.framework/Versions/2.7/bin:
/Library/Frameworks/Python.framework/Versions/2.7/bin:
/Users/dns/Library/Enthought/Canopy_64bit/User/bin:
/opt/local/bin:
/opt/local/sbin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin
pip freeze得到这个结果:
http://yadi.sk/d/JBj9U7vOMZEci
但是如果我尝试导入这个模块,我会看到下一个:
http://yadi.sk/d/xu8U18-5MZFpD 某些包存在,但是在pip冻结中退出的其他包不会在导入时退出(例如扭曲和枕头)。什么F?哪里有问题?在PIP?需要做什么,为什么解决这个问题?需要编辑路径变量或其他任何东西吗?