python-pypi源配置

windows pypi源

C:\Users\Administrator\AppData\Roaming\pip\pip.ini

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

Linux pypi源

~/.pip/pip.conf

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

pip安装

pip3 install urllib_kerberos
pip3 install requests
pip3 install pyyaml
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
你可以通过以下三种方法来配置Python镜像: 1. 在pycharm内部配置:在pycharm中打开项目,点击"File"->"Settings"->"Project Interpreter",找到项目对应的Python解释器,点击右侧的齿轮图标,选择"Show All"。在弹出的窗口中,选择"Add",然后在"Available Packages"下方的输入框中添加镜像地址,比如https://pypi.tuna.tsinghua.edu.cn/simple,点击"OK"保存配置即可。 2. 在命令行使用-i参数配置:打开命令行窗口,使用pip install命令安装包时,通过在命令末尾加上-i参数和镜像地址来指定下载,例如pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple。这样就会使用指定的镜像下载并安装包。 3. 永久配置镜像:在命令行中使用以下命令进行永久配置,在命令行中输入以下命令:pip config set global.index-url https://pypi.tuna.tsinghua.edu.***tsinghua.edu.cn/simple,以后使用pip安装包时就会使用该镜像进行下载。 以上是三种常见的Python镜像配置方法,你可以根据自己的需求选择适合的方法进行配置。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Python配置镜像的三种方法](https://blog.csdn.net/weixin_45779095/article/details/120143727)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wuxingge

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值