You can clone with
Script fails with the following error:
OSError: [Errno 17] File exists: '/Users/kentzo/.virtualenvs/…/lib/python2.7/config'
Please can you provide details of precisely what fails. What command did you run, what OS are you on (OSX?), what was the complete output?
@pfmoore Mac OS X 10.8.4, virtualenv 1.9.1
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv')()
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 979, in main
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1081, in create_environment
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1275, in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn))
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 437, in copyfile
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 412, in copyfileordir
shutil.copytree(src, dest, True)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 177, in copytree
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
OSError: [Errno 17] File exists: '/Users/kentzo/.virtualenvs/MyVirtualEnv/lib/python2.7/config'
Thanks. Looks like you're trying to run virtualenv on an existing directory. I didn't think that was valid usage (my assumption was that if you want a new version of Python, you should recreate the virtualenv from scratch) but that may just be because I never use virtualenv like that.
There's nothing in the documentation to indicate that this is allowed (although nothing much says it's forbidden, either). The error seems to imply that it's not expected to work. Do any of the other developers have a view on whether this is valid usage? @qwcode any comments?
@pfmoore I think virtualenv should provide some mechanism of either upgrading python within virtualenv or migrating site packages from old virtualenv to new.
This is a popular need. See http://stackoverflow.com/questions/10218946/upgrade-python-in-a-virtualenv which suggests that it now works (on Linux?) for point releases of Python (which may be really all we can expect.)
+1 for making this easy. I have dozens of virtualenvs and they keep breaking as I upgrade python. Very time consuming to have to recreate them - and difficult too since it's too late to pip freeze >requirements.txt once they're broken.
pip freeze >requirements.txt