venv
作者:互联网
python3 --version
python3 -m pip --version 若错误:sudo apt install python3.8-venv python3-pip
python3 -m pip install --upgrade pip setuptools wheel
python3 -m venv <DIR>
source <DIR>/bin/activate
python3 -m pip install --user SomeProject
sudo apt-get install python3-virtualenv virtualenv -p python3 ./tf
mkdir ~/.pip cd ~/.pip sudo gedit ~/.pip/pip.conf [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host=pypi.tuna.tsinghua.edu.cn
sudo gedit /etc/apt/sources.list # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
标签:venv,cn,mirrors,ubuntu,https,edu,focal 来源: https://www.cnblogs.com/medsci/p/16057109.html