pip常见操作

  1. pip源

从官网找:https://mirrors.tuna.tsinghua.edu.cn

https://pypi.tuna.tsinghua.edu.cn/simple

  1. pip设置

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

  1. pip升级

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U

  1. pip镜像源配置文件

vim ~/.pip/pip.conf
添加如下内容

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
  1. 查看git源

    pip config list

  2. 手动下载pytorch安装包地址

    https://download.pytorch.org/whl/cu$(CUDA_VERSION_WITHOUT_DOT)/torch_stable.html

  3. 修改源下载库

    pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple pyarrow

    扫描二维码关注公众号,回复: 15635848 查看本文章

猜你喜欢

转载自blog.csdn.net/weixin_43870390/article/details/131091561