Adding Python Path on Windows 7

后端 未结 19 1640
盖世英雄少女心
盖世英雄少女心 2020-11-21 23:37

I\'ve been trying to add the Python path to the command line on Windows 7, yet no matter the method I try, nothing seems to work. I\'ve used the set command, I\

19条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 00:10

    I organized my python environment variable like this under Win7 64-bit using cmd.

    I set the variable PYTHONPATH via environment variable menue of windows and added %PYTHONPATH% to the PATH variable:

    ...;%PYTHONPATH%

    The cmd shell expands the variable correctly to this:

    C:\>echo %PYTHONPATH%
    C:\python27;c:\python27\lib;C:\python27\scripts
    

    Do not forget to restart cmd shell after changing PATH.

提交回复
热议问题