Protocol error on trying to run bench init on a vagrant machine on windows

I have a dual boot windows and ubuntu machine. When working from windows, I sometimes use a vagrant based virtual machine. To access this I use Git Bash which is a command line prompt that enables linux like interaction with the Vagrant VM. When trying to install erpnext on Git Bash, after installing bench and running the command:

bench init --frappe-branch master

I received an error (something like this):

New python executable in .vagrant-env/bin/python
Traceback (most recent call last):
File “/usr/local/bin/virtualenv”, line 9, in
load_entry_point(‘virtualenv==1.11.6’, ‘console_scripts’, ‘virtualenv’)()
File “/usr/local/lib/python2.7/dist-packages/”, line 824, in main
File “/usr/local/lib/python2.7/dist-packages/”, line 984, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File “/usr/local/lib/python2.7/dist-packages/”, line 1404, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 71] Protocol error

Turns out the solution is available here . You need to run git bash as administrator and then run vagrant up to configure and start the VM.

Couldn’t find anything on this in the forum so creating this topic and marking and solved for future lost souls!

1 Like

solved above.