mac 系统更新后,python路径变了,导致之前安装的包不能用了,查看更新后python及包安装路径
$ python -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())"
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
#原路径为/Library/Python/2.7/site-packages/
$ python -c "import os; print os.__file__"
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc
$ python -c "import sys; print sys.executable"
/usr/local/opt/python/bin/python2.7
发表评论 登录: