Please make sure to read Note #2.
This is what you should do if you don't want to create a new virtual environment:
In venv/bin
folder there are 3 files that store your venv path explicitly
and if the path is wrong they take the normal python path so you should change the path there to your new path.
change: set -gx VIRTUAL_ENV "what/ever/path/you/need"
in activate.fish
change: VIRTUAL_ENV="what/ever/path/you/need"
in activate
change: setenv VIRTUAL_ENV "what/ever/path/you/need"
in activate.csh
Note #1:
the path is to /venv
and not to /venv/bin
Note #2:
If you reached this page it means that you are probably not following Python's best practice for a project structure.
If you were, the process of creating a new virtual environment was just a matter of one command line.
Please consider using one of the following methods:
Thanks to Khalaimov Dmitrii, I didn't thought it was because I moved the folder.
>>> rm -rf ...
the problematic venv and re-made it again. Now, it seems to work fine; although, I will never know what the problem was. Do you have guesses or similar experience? – Gillsvenv
, the only possibility is that thevenv
was not created correctly in the first place. If it happens again, do not remove the faulty venv but compare the venv files with some difftool against a working one. It will probably point out the reason for you. – Orphaorphanactivate
scripts). – Mertz