我試圖使用STEP安裝Python虛擬環境:在這個環節上5 Install OpenCV 3 on macOS with Homebrew (the easy way)的.bash_profile配置混亂
我在配置該文件正確
$ nano ~/.bash_profile
只有在編輯像演藝
的.bash_profile中遇到問題# Virtualenv/VirtualenvWrapper
source /usr/local/bin/virtualenvwrapper.sh
不允許我轉到下一步
我得到這個警告mkvirtualenv: command not found
使用幫助,這techstricks.com/mkvirtualenv-command-not-found-virtualenvwrapper/
找到如何virtualenwrapper virtualenvwrapper.readthedocs.io/en/latest/install.html#python-interpreter-virtualenv-and-path
這個鏈接就這樣改變了我的bash_profile
包含
#Homebrew
export PATH=/usr/local/bin:$PATH
export WORKON_HOME=$HOME/.virtualenvs
# Virtualenv/VirtualenvWrapper
source /usr/local/bin/virtualenvwrapper.sh
export PROJECT_HOME=$HOME/Devel
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
當我嘗試$ source ~/.bash_profile
我得到這個
-bash: /usr/local/bin/python: No such file or directory
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is
set properly.
我該如何解決這個問題???????