What exactly should be set in PYTHONPATH?

后端 未结 3 1587
长发绾君心
长发绾君心 2020-12-04 17:47

I\'m going through and writing a setup doc for other developers at work for a python project and I\'ve been reading up on the PYTHONPATH environment variable. I

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 18:06

    For most installations, you should not set these variables since they are not needed for Python to run. Python knows where to find its standard library.

    The only reason to set PYTHONPATH is to maintain directories of custom Python libraries that you do not want to install in the global default location (i.e., the site-packages directory).

    Make sure to read: http://docs.python.org/using/cmdline.html#environment-variables

提交回复
热议问题