Sublime Forum

Incorrect python path

#1

Hello
Some days ago I have migrated from Python3.8 to Python 3.9
I have uninstalled Python3.8 and installed libraries for Python3.9.
Now, Sublime is not detecting the libraries because the path is not pointing to the correct folder.
Sublime is pointing to:
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib

Sublime should point to:
C:\Users\Ernesto\AppData\Local\Programs\Python\Python39\lib.

I have followed the instructions in the forum below but without success.

I have changed all env variables too without success.
I have tested with the command line py.exe and works fine, so could be sublime is not pointing to the correct py.exe file but I can’t find which one uses.

How can I change the path?
Is there any suggestion
Thanks for your help.

0 Likes

#2

Sublime only gets this kind of information from external sources like the PATH, though it may be worth pointing out that when you change environment variables you need to restart Sublime before it will see them as changes.

All applications that Sublime launches are either specifically pointed at something in your sublime-build file (e.g. "shell_cmd": "c:/some/long/path/to/tool $file"), or are looked up on the PATH. In the case of of just py (such as is used in the default build system that ships with ST4) is looked up that way as well. It may need to be told to use a specific version of Python, though that would not be a Sublime related configuration per se (other than maybe modifying the build or similar).

0 Likes

#3

Hello,
Finally, I got the issue.
I generated a new Build system but I forgot to change the SublimeREPL configuration.
It was running still the old python version.

Thanks

0 Likes