python 2.7 安装virtualenv
2021/8/24 14:05:32
本文主要是介绍python 2.7 安装virtualenv,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
环境: macOS big sur, zsh
pip install virtualenv
安装后提示:
WARNING: The script virtualenv is installed in '/Users/tonyyan/Library/Python/2.7/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
为zsh添加环境变量:
vi ~/.zshrc
加入以下两行:
# virtualenv for python2.7 export PATH="$PATH:/Users/tonyyan/Library/Python/2.7/bin"
保存并退出vim
source ~/.zshrc
此时可以验证 virtualenv已成功安装
virtualenv --version
virtualenv 20.7.2 from /Users/tonyyan/Library/Python/2.7/lib/python/site-packages/virtualenv/__init__.pyc
这篇关于python 2.7 安装virtualenv的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-14获取参数学习:Python编程入门教程
- 2024-11-14Python编程基础入门
- 2024-11-14Python编程入门指南
- 2024-11-13Python基础教程
- 2024-11-12Python编程基础指南
- 2024-11-12Python基础编程教程
- 2024-11-08Python编程基础与实践示例
- 2024-11-07Python编程基础指南
- 2024-11-06Python编程基础入门指南
- 2024-11-06怎么使用python 计算两个GPS的距离功能-icode9专业技术文章分享