各位,我还没搞定
我设置了 PYTHONPATH 了
原来
>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.7/dist-packages/Project_RNN_Enhancement-0.0.1-py2.7.egg', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
现在
>>> sys.path
['', '/usr/local/lib/python2.7/dist-packages/Project_RNN_Enhancement-0.0.1-py2.7.egg', '/usr/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
可以看到
'/usr/local/lib/python2.7/dist-packages' 是添加进去了
但是在 /usr/lib/python2.7/dist-packages 后面啊
我这两个目录里都有 six 包
怎么办,还是会先找 /usr/lib/python2.7/dist-packages 下边的
我能否升级 six 就是直接升级 /usr/lib/python2.7/dist-packages 下边的,怎么弄呢.
很奇怪,为啥升级会默认去升级 /usr/local/lib/python2.7/dist-packages 的