skip to Main Content

I may have messed up some environmental path variables.

I was tinkering around VS Code while learning about Django and virtual environments, and changing the directory path of my Python install. While figuring out how to point VS Code’s default Python path, I deleted some User path variables.

Then, isort began to refuse to run.

I’ve tried uninstalling the extension(s), deleting the ms-python.’s, and uninstalling VS Code itself, clearing the Python Workspace Interpreter Settings, and restarting my computer.

Even if it’s not my path variables, anyone know the defaults that should be in the "user" paths variables?

5

Answers


  1. Chosen as BEST ANSWER

    I ended up refreshing my Windows install. Was for the best because I'm repurposing an older machine anyway.


  2. You need to find the location of the python.exe file.

    Usually it is C:UsersAdminAppDataLocalProgramsPythonPython310

    You can also automatically add python to the system environment by deleting and reinstalling it. During installation, a small box is automatically checked to add environment variables.

    Login or Signup to reply.
  3. Another reason maybe that you are using a python version older than 3.7, which isort is not supporting anymore. Here is a reference link.

    Login or Signup to reply.
  4. I also had this error on one of my windows machines. I don’t know why the isort extension only chrashed on this machine and worked well on the other windows machines.

    I fixed it by manually setting the path to python.exe in the settings of the isort extension:

    In VSCode go to Settings > Extensions > isort > Interpreter and enter the path to python.exe for example:

    C:WinPythonWPy64-39100python-3.9.10.amd64python.exe

    Login or Signup to reply.
  5. only change your python interpreter on VScode

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search