当在终端键入 virtualenv
系统报错:zsh: command not found: virtualenv
然后执行pip安装: pip install virtualenv
系统响应:Requirement already satisfied:
virtualenv in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (16.0.0)
解决办法:
在终端执行: vim ~/.zshrc
然后在文件下方添加该行代码:export PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:$PATH
然后保存推出
终端执行: source .zshrc ( 配置完,要激活)
临时设置
export PATH=/opt/android-studio/bin:$PATH
当前用户的全局设置
vim ~/.profile,添加行:
export PATH=/opt/android-studio/bin:$PATH
使生效
source .profile
所有用户的全局设置
vim /etc/profile
在里面加入:
export PATH=/opt/android-studio/bin:$PATH
使生效
source /etc/profile