标签:apt-get pytho fish py3 $path export simple bash conf
[TOC]sudo apt-get install python3-pip -y
# sudo apt-get install python2-pip -y
sudo mkdir ~/.pip
sudo cat << EOF > ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
EOF
sudo pip3 install virtualenv
find ~/ -name virtualenv
/home/hxy/.local/bin/virtualenv
cat << EOF > ~/a
export PATH=$PATH:/home/hxy/.local/bin
EOF
virtualenv --python=/usr/bin/python3 py3
$ ls
bin include lib
cd py3
$ ls
bin include lib
$ cd bin/
$ ls
activate activate.ps1 easy_install pip3 python3 wheel
activate.csh activate_this.py easy_install-3.6 pip3.6 python3.6
activate.fish activate.xsh pip python python-config
# 激活
$ source activate
(py3) hxy@mghxy[18:17:43]:~/py3/bin
# 关闭
# 创建python系统默认的虚拟环境
virtualenv pyenv
# 创建python3虚拟环境
virtualenv --python=/usr/bin/python3 py3env
标签:apt-get pytho fish py3 $path export simple bash conf
原文地址:https://blog.51cto.com/853056088/2461495