debian9部署python2虚拟环境

apt-get install python-pip
pip install virtualenv -i https://pypi.douban.com/simple/
virtualenv -p /usr/bin/python2.7 env2.7
cd env2.7/
source bin/activate


# 查看版本
(env2.7) [root@test 13:58:08 ~/env2.7]# pip -V
pip 20.3.4 from /root/env2.7/lib/python2.7/site-packages/pip (python 2.7)

  

posted @ 2022-03-16 14:14  lucky_tomato  阅读(110)  评论(0编辑  收藏  举报