I have venv
created in Windows with all dependencies for my project, but when transfered whole project from Windows 10
to Ubuntu
, my usual way to activate venv
does not work:
venv\Scripts\activate
Do I have to re-create new venv
in Ubuntu and use requirements.txt
to install all dependencies for my project, or is it possible to use my old venv
and if so how?
You need to recreate the virtual environment. These commands can help you get the list of dependencies installed in the existing environment:
python -m pip freeze > requirements.txt
and then install these dependencies in the new environment:
python -m pip install --requirement requirements.txt
There is info about this topic here: