1
請幫我理解這一點。在這裏你可以看到,我有PYTHONPATH集PYTHONPATH從環境中丟失
[email protected]:~$ echo $PYTHONPATH
:/home/jean/local/lib/python2.6/site-packages
(從我.bashrc
的),但是,如果我嘗試在我的本地站點包推出的東西會被忽略:
[email protected]:~$ gtimelog
Traceback (most recent call last):
File "/home/jean/bin/gtimelog", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2671, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 654, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 552, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: gtimelog==0.5.0
現在,如果我手動出口PYTHONPATH精確值echo
向我展示上面,則不能忽略:
[email protected]:~$ export PYTHONPATH=:/home/jean/local/lib/python2.6/site-packages
[email protected]:~$ gtimelog
# SUCCESS
任何線索是怎麼回事?
就是這樣!什麼是新手的錯誤。奇怪的是,骨架bashrc(/usr/share/base-files/dot.bashrc)設置HISTCONTROL,PS1和其他沒有導出。 (Ubuntu 10.10) – 2011-02-11 04:38:48