anaconda--配置pip


1、在合适的系统寻找合适的环境配置文件。不存在的话需要自己新建一个。

Configuration

Config file

pip allows you to set all command line option defaults in a standard inistyle config file.

The names and locations of the configuration files vary slightly acrossplatforms. You may have per-user, per-virtualenv or site-wide (shared amongstall users) configuration:

Per-user:

  • On Unix the default configuration file is: $HOME/.config/pip/pip.confwhich respects the XDG_CONFIG_HOME environment variable.
  • On macOS the configuration file is$HOME/Library/ApplicationSupport/pip/pip.conf.
  • On Windows the configuration file is %APPDATA%\pip\pip.ini.

There are also a legacy per-user configuration file which is also respected,these are located at:

  • On Unix and macOS the configuration file is: $HOME/.pip/pip.conf
  • On Windows the configuration file is: %HOME%\pip\pip.ini

You can set a custom path location for this config file using the environmentvariablePIP_CONFIG_FILE.


2、使用以下配置项

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


3、重启pip。成功加速安装。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值