lshore's recent timeline updates
lshore

lshore

V2EX member #126331, joined on 2015-07-09 14:35:40 +08:00
lshore's recent replies
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
各位,我还没搞定
我设置了 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 的
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
@Livid 好的
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
@oclock .. 听起来我是犯了什么规.. ok
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
@SourceMan 怎么都对这个感兴趣,就是linux 搜狗输入法啊
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
@seerhut 往 sys.path 里再添加我的路径? 中文输入法中英文懒得切换的原因
Jun 20, 2016
Replied to a topic by lshore Python 关于 Python 软件包升级问题
@yangtukun1412
'1.10.0' 的是在 /usr/local/lib/python2.7/dist-packages  下,
'1.5.2'  的是在 /usr/lib/python2.7/dist-packages 下

那应该怎么把six升级到 /usr/lib 下呢?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2889 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 00:26 · PVG 08:26 · LAX 17:26 · JFK 20:26
♥ Do have faith in what you're doing.