Sublime Forum

Python3 does not work in Windows - Directory Error with Sublime

#1

I’ve reinstalled and installed python and sublime several times. I’ve looked through several forums and google and can not seem to find this answer but I do see that several other people are also having this issue. I have python3 installed but something about the directory isn’t correct. I didn’t do anything other than just install both.

Not sure if this means anything:
If I open CMD and type python it opens python 3.8.1. But if I type python3 in CMD it says not recognized.

This is the error:

[WinError 2] The system cannot find the file specified
[cmd: [‘python3’, ‘-u’, ‘C:\Users\DELL-T3500\Desktop\python_work\apostrophe.py’]]
[dir: C:\Users\DELL-T3500\Desktop\python_work]
[path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Users\DELL-T3500\AppData\Local\Smartbar\Application;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\project2\casperjs\bin;C:\project2\phantomjs\bin;C:\Users\DELL-T3500\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\DELL-T3500\AppData\Local\Programs\Python\Python38;C:\Users\DELL-T3500\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\DELL-T3500\AppData\Local\Programs\Python\Python38-32]
[Finished]

0 Likes

#2

So I am thinking that because when I got to CMD and type in: python
it actually opens up python 3.8.1 that when i type: python3
it says unrecognizable that python is actually python3
not sure why the python3 does not work and I am not sure if it actually matters?

0 Likes

#3

The two versions are distinguished on some platforms (Linux for example) as python and python3 in cases where both Python 2 and Python 3 are installed, since the two of them are not directly 100% compatible with each other. In a case like that, if python is actually Python 2, then Python 3 would be installed as python3 so that existing things that expect version 2 of Python will still work.

In your case if python executes the version of Python that you want, then that should be good enough for your purposes so you could switch to using that instead in your custom sublime-build file (or just use the default Python.sublime-build that ships with Sublime, if the only change you needed to make was changing python with python3).

0 Likes