PYTHONPATH ignored

前端 未结 7 1735
离开以前
离开以前 2021-01-04 10:33

Environment: debian 4.0

Python 2.4

My \'project\' is installed in:

/usr/lib/python2.4/site-packages/project.

Bu

7条回答
  •  佛祖请我去吃肉
    2021-01-04 11:02

    I found the problem (I've missed early on when somebody pointed me to Where is Python's sys.path initialized from?).

    It seems that easy_install creates a pth file /usr/lib/python2.4/site-packages/easy-install.pth which is then loaded by site.py. This inserts the site-packages path in the sys path before the PYTHONPATH. Not nice.

提交回复
热议问题