由于在centos环境下,将python做与python3.8.1做了软链接(ln -s python python3.8.1),并且pip也被我做了软链接,所以导致用pip安装virtualenvwrapper之后,启动virtualenvwrapper.sh时以及workon 虚拟环境时报错:
这是根据提示230行的语句:
然后在virtualenvwrapper.sh文件中查找VIRTUALENVWRAPPER_PYTHON,发现了:
```powershell
# Locate the global Python where virtualenvwrapper is installed.
if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
then
VIRTUALENVWRAPPER_PYTHON="$(command \which python)"
fi
改为:
# Locate the global Python where virtualenvwrapper is installed.
if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
then
VIRTUALENVWRAPPER_PYTHON="$(command \which python3)"
fi
鉴于之前我使用python3.8安装的,所以此处要改成python3。然后这个错误就消失了。
注意