Python:(virtualenv) 男娘i 2022-05-23 11:53 174阅读 0赞 安装pip: sudo apt-get update sudo apt-get install python3-pip 更新pip版本: python -m pip --trusted-host [pypi.python.org][] install --upgrade pip 安装模块: pip --trusted-host [pypi.python.org][] install Appium-Python-Client pip --trusted-host [mirros.aliyuncs.com][] install -i [http://mirros.aliyuncs.com/pypi/simple][http_mirros.aliyuncs.com_pypi_simple] flask pip install -i [https://pypi.mirrors.ustc.edu.cn/simple][https_pypi.mirrors.ustc.edu.cn_simple] flask 安装virtualenv: sudo pip3 install virtualenv pip install virtualenv sudo easy\_install virtualenv 创建虚拟环境: virtualenv venv(-p参数改变Python版本) virtualenv -p D: \\Python 27 \\python .exe venv27(windows ) virtualenv -p /usr/bin/python3 venv27(linux) 激活虚拟环境: venv27/bin/activate(linux) venv27\\scripts\\activate(windows) source env26/bin.active 关闭虚拟环境: deactivate 激活virtualenv中flask: pip install -i [http://mirros.aliyuncs.com/pypi/simple][http_mirros.aliyuncs.com_pypi_simple] flask [pypi.python.org]: http://pypi.python.org/ [mirros.aliyuncs.com]: http://mirros.aliyuncs.com/ [http_mirros.aliyuncs.com_pypi_simple]: http://mirros.aliyuncs.com/pypi/simple [https_pypi.mirrors.ustc.edu.cn_simple]: https://pypi.mirrors.ustc.edu.cn/simple
还没有评论,来说两句吧...