[Python] I changed my directory name and now my venv isn't working

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    Changed my dir name from a test/development directory name to a proper name for release. (changed to "project" for this question because the actual name is rather long)

    Now when I activate my venv, I get the following:

    (virtualEnv) PS ~\Desktop\dev\vbvarsel> pip --list
    Fatal error in launcher: Unable to create process using '"~\Desktop\dev\project_0.0.1\virtualEnv\Scripts\python.exe" "~\Desktop\dev\project\virtualEnv\Scripts\pip.exe" --list': The system cannot find the file specified.


    I went into my pyvenv.cfg, and the activate scripts to modify the path to the venv's python and pip exes (this is the correct one ~\Desktop\dev\project\virtualEnv), but it doesn't seem to be registering this? This [~\Desktop\dev\project_0.0.1\virtualEnv\Scripts\python.exe] is causing the error, it is looking at the wrong directory, I don't know where it is reading that from. It is not a system variable, if I search the files in this directory, it doesn't yield any results. Have I just completely borked it and need to start from scratch with my virtual environment?

    I am on Windows 11, using VSCode, if that should help.

    Continue reading...

Compartilhe esta Página