当前位置:网站首页>软件配置 | pip下载第三方库文件及配置pip源的不完全总结
软件配置 | pip下载第三方库文件及配置pip源的不完全总结
2022-08-10 15:42:00 【MissMango0820】
本文对如何使用 pip
下载第三方库文件及配置 pip
源进行不完全总结 1。
Updated: 2022 / 8 / 8
python
默认的 pip
源在国外,如果下载比较大的第三方库时可能会非常非常慢,甚至会报错,所以为了有一个更加友好的 python
使用体验,建议为 python
的 pip
换一下源。
pip 下载
- 使用默认源下载
pip install 库名==版本
- 使用特定源下载
pip install 库名==版本 -i 源地址
比如,使用阿里云的pip
源, 如下图所示:
pip 源文件配置
windows
windows
上要在用户主目录加上一个 pip
文件夹,里面增加一个 pip.ini
文件。
pip.ini
中填上内容。用户主目录即 系统盘/用户/[用户名]/
(建立 ini
文件时可以先建立记事本文件然后编辑后再重名为 pip.ini
)。
linux
在当前用户目录下创建 .pip
文件夹: mkdir ~/.pip
,然后在该目录下创建 pip.conf
文件填写(类似windows
):
[global]
trusted-host=[主机名]
index-url=[镜像源的url]
例如,使用阿里云提供的 pip
源:
[global]
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
参考链接
边栏推荐
猜你喜欢
Cesium Quick Start 4-Polylines primitive usage explanation
Spike project harvest
Allwinner V853 development board transplants LVGL-based 2048 games
openpyxl绘制堆叠图
Recommend a few had better use the MySQL open source client, collection!
It is reported that the original Meitu executive joined Weilai mobile phone, the top product may exceed 7,000 yuan
【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
FP6378AS5CTR SOT-23-5 高效1MHz2A同步降压调节器
APP automation testing with Uiautomator2
Understanding_Data_Types_in_Go
随机推荐
Recommend a few had better use the MySQL open source client, collection!
一文让你快速了解大小端概念!
全志V853开发板移植基于 LVGL 的 2048 小游戏
Custom picker scroll selector style
【芯片】人人皆可免费造芯?谷歌开源芯片计划已释放90nm、130nm和180nm工艺设计套件
JS 从零手写实现一个bind方法
第壹章模块大全之《re模块》
5G NR MIB Detailed Explanation
Appium for APP automation testing
Community News——Congratulations to Dolphin Scheduling China User Group for 9 new "Community Administrators"
Detailed understanding of all built-in functions (Part 2)
cmake 小技巧 记录
【每日一题】【leetcode】26. 链表-链表中倒数第k个节点
秒杀项目收获
哈希表应用:只出现一次的数字
Servlet简单项目操作
Mobileye joins hands with Krypton to open a new chapter in advanced driver assistance through OTA upgrade
PYSPARK ON YARN报错集合
Oracle数据库备份dmp文件太大,有什么办法可以在备份的时候拆分成多个dmp吗?
2025年推出 奥迪透露将推出大型SUV产品