Sublime Forum

[shell_cmd: python -m py_compile] issue

#1

Hi,

I am a Windows 10 user and I am new to Sublime Text 3.

I followed the following steps for installation:

  • install Python 2.7.14
  • install Sublime Text 3 (64bit version)
  • install anaconda using the Package Control in Sublime Text 3

I can run Python in Python IDLE and it works fine. Though, everytime I run the same code in Sublime Text 3, I get the following error:

“[Finished in 0.1s with exit code 1]
[shell_cmd: python -m py_compile “C:\Users…\Desktop\temp.py”]
[dir: C:\Users…\Desktop]
[path: C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Skype\Phone;C:\Users…\AppData\Local\Microsoft\WindowsApps;]”

Can you please tell me what I’m missing here?

Thanks!

0 Likes

#2

The problem is that python is not in your path , you need to modify your path variable:

  • Open cmd
  • type:
set path="path to python"

just go to the python directory and copy the path and paste it .

One more thing is that in order to run your python script you need to choose the python build system:

  • ctrl + shift + B
  • Choose python
0 Likes