A common caveat: back up first. However, the structure created by virtualenv is not so complex, so it should be possible to either find what you need or create a new one and complete the migration. A path with ~/.virtualenvs in it means that it was probably created using virtualenvwrapper so you can read about it too.
virtualenv makes copies of executable files in the bin , which means that they should not exist elsewhere. However, in the lib and includes directories, by default there will be symbolic links to elements from the "source" python (unless someone has changed this setting). You can do ls -l in these directories, and you might find where python 2.7 is installed, or maybe some broken symbolic links.
There must be one or more python-<version> directories in lib , with some symbolic links (possibly) to the standard python library material and the site-packages directory where your installed packages are located.
Now, update. If you try to update virtualenv "in-place" (i.e. you just run virtualenv --python==python<version> <existing-directory> ), then you will probably encounter two problems: (1) The bin/python symlink bin/python will not be replaced if you do not delete / move it, and (2) the directories under lib on the same version of python, so if you are not using 2.7, then the site-packages directory will not be automatically transferred - you will have to reinstall packages or going in and moving this will probably work unless you compiled binary extensions or switched to 3.x, or something else Noe.
An alternative, cleaner approach is to create a new, fresh virtualenv, and then reinstall the necessary packages. First, find your own application package and find out if they have setup.py that works or is just code that is in the directory. If they do not have setup.py , which correctly introduces all the dependencies, then in your existing virtualenv folder you can run ./bin/pip freeze to get a list of installed packages. You can save this to a file and use pip install -r <filename> on it later.
source share