我使用 RPI3B 并尝试安装 Virtualenvwrapper 和 Virtualenvs。在我添加之后
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
Run Code Online (Sandbox Code Playgroud)
在 ~/.profile 中。然后source ~ ~/.profile
我使用mkvirtualenv cv -p python2. 之后我收到这些消息:
created virtual environment CPython2.7.16.final.0-32 in 672ms
creator CPython2Posix(dest=/home/pi/.virtualenvs/cv, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy,
app_data_dir=/home/pi/.local/share/virtualenv/seed-v1)
activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator
virtualenvwrapper.user_scripts creating /home/pi/.virtualenvs/cv/usr/local/bin/predeactivate
ERROR: Environment '/home/pi/.virtualenvs/cv' does not contain an activate script.
Run Code Online (Sandbox Code Playgroud)
但我不能使用 workon cv。最后的消息一次又一次地出现。我该如何解决?我也尝试重新安装,但没有帮助。
python virtualenv virtualenvwrapper raspberry-pi raspberry-pi3