您好,登錄后才能下訂單哦!
[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
# 關閉
# 創(chuàng)建python系統默認的虛擬環(huán)境
virtualenv pyenv
# 創(chuàng)建python3虛擬環(huán)境
virtualenv --python=/usr/bin/python3 py3env
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。