Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Can';设置漫游箱时不要安装VirtualVWrapper_Python_Django_Django Rest Framework_Vagrant_Virtualbox - Fatal编程技术网

Python Can';设置漫游箱时不要安装VirtualVWrapper

Python Can';设置漫游箱时不要安装VirtualVWrapper,python,django,django-rest-framework,vagrant,virtualbox,Python,Django,Django Rest Framework,Vagrant,Virtualbox,我正试图关注伦敦App开发者系列的视频系列,名为“用Python&Django构建一个后端restapi” 设置vagrant文件后,在运行vagrant ssh命令时,我收到一个错误消息,上面说: “-bash:/usr/local/bin/virtualenvwrapper.sh:没有这样的文件或目录” 我的流浪汉文件具有以下代码: sudo pip install virtualenvwrapper --user if ! grep -q VIRTUALENV_ALREADY_A

我正试图关注伦敦App开发者系列的视频系列,名为“用Python&Django构建一个后端restapi”

设置vagrant文件后,在运行vagrant ssh命令时,我收到一个错误消息,上面说:

“-bash:/usr/local/bin/virtualenvwrapper.sh:没有这样的文件或目录”

我的流浪汉文件具有以下代码:

    sudo pip install virtualenvwrapper --user

if ! grep -q VIRTUALENV_ALREADY_ADDED /home/vagrant/.bashrc; then
    echo "# VIRTUALENV_ALREADY_ADDED" >> /home/vagrant/.bashrc
    echo "WORKON_HOME=~/.virtualenvs" >> /home/vagrant/.bashrc
    echo "PROJECT_HOME=/vagrant" >> /home/vagrant/.bashrc
    echo "source /usr/local/bin/virtualenvwrapper.sh" >> /home/vagrant/.bashrc
fi
  SHELL

end
我找到了此帖子,但无法使其正常工作:


多谢各位

可能virtualenvwrapper.sh没有安装在
/usr/local/bin
中,而是安装在其他地方,具体取决于您的发行版。你应该检查这个问题: