当前位置 博文首页 > 星星之火的博客:mkvirtualenv Command ‘‘ not found, but can
使用两个命令:
sudo apt install virtualenv
sudo apt install virtualenvwrapper
命令:
mkvirtualenv envirname
报错:
mkvirtualenv command not found
①通过nano命令进入.bashrc文件:
nano ~/.bashrc
②在此文件最后加入两行:(注意第二条是路径,要自己看自己的virtualenvwrapper.sh在哪!)
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
③加载.bashrc文件:
source ~/.bashrc
截取了部分:
Command '' not found, but can be installed with:
sudo apt install mailutils-mh # version 1:3.7-2.1, or
sudo apt install meshio-tools # version 4.0.4-1
sudo apt install mmh # version 0.4-2
sudo apt install nmh # version 1.7.1-6
sudo apt install termtris # version 1.3-1
将刚刚在.bashrc文件中加的两行换为:(注意:第一行的意思是virtualenvwrapper使用python3,第一行中路径应该是你虚拟机中安装的python3路径,通过命令which python3 查看自己的路径换了!)
export VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'
source /usr/local/bin/virtualenvwrapper.sh
cs