Reputation: 5
If I run the basic IDLE on Python, it will run my scripts but when I try to run them though Sublime 3 it states Python is not recognized. This is even though Python is already added to my path.
Another odd thing is when I type python
in my command line it is not recognized but if type in py
, it shows the Python version.
This is the path:
[path:C:\ProgramFiles(x86)\NVIDIACorporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramFiles(x86)\ATITechnologies\ATI.ACE\CoreStatic;C:\ProgramFiles\dotnet\;C:\Users\Tommy\AppData\Local\Programs\Python\Python37\Scripts]
Upvotes: 1
Views: 53
Reputation: 1691
Your PATH should also point to
C:\Users\Tommy\AppData\Local\Programs\Python\Python37\
it just points to Python's scripts, not Python itself.
Sublime tries to use "python"
, but as it isn't in PATH, it doesn't work. That is the same for your command line.
If you point it to the folder I used, it will look for Python 3.7, if you need to use other Python's versions, you can use the py
helper.
For example, for Python 3.6:
py -3.6 <script>
Upvotes: 1
Reputation: 6324
The python.exe
file has to be in one of directories listed in the PATH
variable.
If it's not in
C:\Users\Tommy\AppData\Local\Programs\Python\Python37\Scripts
then you have to add another directory. My guess would be the Python37
directory.
Upvotes: 1