I have a virtualenv
located at /home/user/virtualenvs/Environment
. Now I need this environment at another PC. So I installed virtualenv-clone
and used it to clone /Environment
. Then I copied it to the other PC via USB. I can activate it with source activate
, but when I try to start the python interpreter with sudo ./Environment/bin/python
I get
./bin/python: 1: ./bin/python: Syntax Error: "(" unexpected
Executing it without sudo gives me an error telling me that there is an error in the binaries format.
But how can this be? I just copied it. Or is there a better way to do this? I can not just use pip freeze
because there are some packages in /Environment/lib/python2.7/site-packages/
which I wrote myself and I need to copy them, too. As I understand it pip freeze
just creates a list of packages which pip then downloads and installs.
Do the following steps on the source machine:
On the other PC:
You should be done.
Other Resources:
I share my experience.
The following is working for me.
Step:
embeddable zip file
does not provide pip)folder artictures:
The abbreviated content about main.nsi is as follows:
hope someone will benefit from this.
Usually I use virtualenv to create a new environment, then I go to the environment where I want to copy from, copy all the folders and paste it into the environment folder I just created, but most importantly when asking if you want to replace the Destination files, choose to skip these files. This way you keep your settings. At least for me, this has worked very well. I hope it works for you too.
I think what occurs is that you just copy the symbolic links in the source file to the target machine as binary files(no longer links). You should copy it using
rsync -l
to copy to keep those links.