RFE: --always-copy #344

nvMcJohn opened this Issue Oct 19, 2012 · 7 comments


None yet

7 participants


Given that the footprint of the copy would be relatively small, would it be possible to add an option to always copy (as on windows) rather than symlinking?

The main benefit of copying is the ability to then check the virtual environment into source control.


schmir commented Oct 19, 2012

that's also discussed in #92

pnasrat commented Oct 23, 2012

I don't have a huge issue with this - do you want to try put a patch together.

Sure, I'll take a stab at it.

m0she commented Feb 19, 2013

I've made a simple patch that works for me (at least using a shared windows folder on a linux machine, which didn't work before) - https://gist.github.com/m0she/4990128 - just add --always-copy to your command-line to use.

I haven't tested it thoroughly nor is it completely abiding to the project coding conventions and github is stuck on cloning the repo - so I'm not sending a pull request (perhaps tomorrow)

pferreir commented Mar 7, 2013

+1 for this!

jpascal commented Sep 17, 2013

$ virtualenv --version
$ virtualenv --always-copy test
New python executable in test/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in
load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 821, in main
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 956, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg/virtualenv.py", line 1377, in install_python
shutil.copyfile(py_executable_base, full_pth)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'python'

qwcode commented Dec 5, 2013

this was added in #409
(the bug for it not working though is #495)

@qwcode qwcode closed this Dec 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment