I'd I like to install virtualenv on an USB disk so that i can use it also on other computers. How can I do it? Just creating a virtualenv on the disk doesn't seem to work...
I'm using Mac and the target computer has Fedora.
I'd I like to install virtualenv on an USB disk so that i can use it also on other computers. How can I do it? Just creating a virtualenv on the disk doesn't seem to work...
I'm using Mac and the target computer has Fedora.
You should be able to do it using Winpython
Check out this answer: Using Virtualenv with Winpython from flash drive
edit based on the update about MacOs on comments
You can install using anaconda using silent install mode That was taken from: https://stackoverflow.com/a/45140556/4288795 The answer is for windows, but it should be adaptable to MacOs using the link above
Good luck on your projects!
Short answer is YES but of no use.
The internal architecture used in Virtualenv, hard codes all the paths as absolute paths in multiple places. Most notably all the files in the "site-packages" folder contain hard coded paths and many or most of them are in ascii format. So there is no normal means to change them to a relative paths.
It may however work in a very restricted set of situation like if you can maintain the same folder path in all the computers and same family of os etc etc. But and its a really big 'but' whether even in this scenario it will work smoothly.
Unless there is vendor support from its architecture level you cannot get true portability.
Using pip-freeze with "requirements" file and recreating the virtualenv on all systems separately is the only option available as of now.