protocol error setting up virtualenvironment through vagrant on ubuntu

前端 未结 6 2166
广开言路
广开言路 2020-12-15 20:14

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

相关标签:
6条回答
  • 2020-12-15 20:23

    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...

    0 讨论(0)
  • 2020-12-15 20:23

    Use this

    virtualenv --python= <#Python path for specific version#> <#Folder name#> --always-copy

    Example:

    virtualenv --python=/usr/local/bin/python3.7 venv --always-copy

    0 讨论(0)
  • 2020-12-15 20:28

    I have had a similar problem. Just restarting the vagrant box was enough to solve it.

    0 讨论(0)
  • 2020-12-15 20:37

    This worked for me:

    sudo virtualenv venv

    0 讨论(0)
  • 2020-12-15 20:44

    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

    0 讨论(0)
  • 2020-12-15 20:45

    The solution is to use --always-copy. See here for the gory details.

    0 讨论(0)
提交回复
热议问题