I'm trying to set up a virtualenv on Ubuntu 12.04 with Python 2.7 using vagrant but having same issues. it seems like this issues is seen only when "vagrant up" is issued from windows. what is the solution? any pointers?
New python executable in .vagrant-env/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.11.6', 'console_scripts', 'virtualenv')()
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 824, in main
symlink=options.symlink)
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 984, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1404, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 71] Protocol error
The solution is to use --always-copy
. See here for the gory details.
I found the issue and fixed it. Just start your git bash/cmd prompt console as an administrator. Then, vagrant up > setup your virtual env. It should be a cake walk.
Thanks Venkat
This error can be fixed if you create the virtual env outside the /vagrant/ shared folder...
If go to the home folder of your vagrant user, you can create the virtualenv in there without this problem!
Just the venv must be out of this /vagrant/ directory... after that you can go work as usually activating this venv and working with your sorce code in the usual /vagrat/ shared dir...
Use this
virtualenv --python= <#Python path for specific version#> <#Folder name#> --always-copy
Example:
virtualenv --python=/usr/local/bin/python3.7 venv --always-copy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With