I'd like to create a virtualenv which does not use symlinks to the local system, as I wish to bundle the virtualenv (including third party packages) with my application. Is this possible - and if so, how?
For example, on my Mac OS X 10.10.2, any virtualenv I create contains the symlink:
.Python -> /System/Library/Frameworks/Python.framework/Versions/2.7/Python If I create my virtualenv directly on a network server share with --always-copy I get an error:
$ virtualenv --always-copy python2.7.9_win7-64_stalker0.2.13 New python executable in python2.7.9_win7-64_stalker0.2.13/bin/python Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 11, in <module> sys.exit(main()) File "/Library/Python/2.7/site-packages/virtualenv.py", line 825, in main symlink=options.symlink) File "/Library/Python/2.7/site-packages/virtualenv.py", line 985, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/Library/Python/2.7/site-packages/virtualenv.py", line 1374, in install_python symlink) File "/Library/Python/2.7/site-packages/virtualenv.py", line 482, in copyfile copyfileordir(src, dest, symlink) File "/Library/Python/2.7/site-packages/virtualenv.py", line 456, in copyfileordir shutil.copy2(src, dest) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat os.chflags(dst, st.st_flags) OSError: [Errno 22] Invalid argument: 'python2.7.9_win7-64_stalker0.2.13/.Python'