I want to make a 'copy' of my python virtual environment, which is a venv, in another directory (on a different machine) following this post. But I run into some problems for which I found no solution elsewhere and I don't know what happens:
My steps:
I do pip freeze > venv_requirements.txt
and copy that file over to the other directory. There I make a new venv with python3 -m venv ./venvLocal
and activate it. Next I run python3 -m pip install -r venv_requirements.txt
.
The problem: For multiple packages I get the error Could not find a version that satisfies the requirement ... No matching distribution found for ...
.
What I tried: 1. The version of pip in the original venv was older that the one in my new venv. I downgraded pip to the same version as the original, but the problem persisted, 2. I installed the packages for which the stated version could not be found by hand with pip install ..
. The installation worked fine, but when running my code afterwards I got many error messages that modules are not found or that there are problems within the modules.
Further: 1. which pip
gives me (correctly) the one in my venv, 2. the original venv was created with exact the same command as the second one., 3. The original and new venv are on different (linux) machines, connected via ssh.