Running python in Sublime Text 2 getting error

前端 未结 2 1064
小鲜肉
小鲜肉 2021-01-20 22:46

so I have recently gotten into python and I use sublime text 2 alot for things like HTML and CSS and I want to use it for python too but when i try to compile with it I get the

2条回答
  •  感动是毒
    2021-01-20 23:30

    You need to add the python directory to your system's path environment variabe. To do that in windows you need go to Control Panel> System and Security > System > Advanced System Settings> in the advanced tab go to Environment Variables. In the environment variables in the System Variables area scroll down until you find Path. Select it and press Edit. Then a window should appear titled Edit System Variable where you have the variable name (should be path) and the variable value which is a long string. At the start of the string you need to manually add the python's directory. For example my python 2.7 directory is at *C:\Python27* So you need to add C:\Python27\ at the start of the string. So after you do that the value should now look something like that:

    C:\Python27\;C:\Program Files etc..

    Try that and tell us the results :)

    Hope that helped

    Cheers, Alex

提交回复
热议问题