Python-在Windows中找不到pip.ini或pip.conf [英] Python - cant find pip.ini or pip.conf in Windows

查看:1239
本文介绍了Python-在Windows中找不到pip.ini或pip.conf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Win7机器上安装了Python 2.7.8,该机器已经预安装了pip.
我已经能够从pip成功安装新软件包,现在我需要向其中添加自定义存储库网址安装pip列表

I got Python 2.7.8 installed on my Win7 machine, which comes with pip already pre-installed.
I'm successfully able to install new packages from pip and now I need to add custom repository url to the install list of pip

为此,我需要根据%APPDATA%\pip\pip.ini中的pip.ini. ="noreferrer">官方手册
但是,任何地方都没有pip文件夹(不在Roaming中,不在Local中,不在LocalLow中) 在C:\ProgramData\PyPA\pip\pip.conf

To do so I need to modify pip.ini which is in %APPDATA%\pip\pip.ini according to the Official Manual
However there are no pip folder anywhere (not in Roaming, not in Local, not in LocalLow) nor there exists PyPa folder in: C:\ProgramData\PyPA\pip\pip.conf

您能告诉我在哪里搜索pip.ini吗?如何将外部仓库添加到安装列表中?

Could you tell me where do i search for pip.ini? how to add foreign repo to the install list?

推荐答案

最后对它进行了排序.

Finally got it sorted.

显然,对于Windows用户,pip.ini配置文件未创建,但是可以手动添加!

Apparently for Windows users pip.ini config file is not created, however can be added manually!

只需创建新的%APPDATA%\pip\pip.ini和自定义存储库的内容即可

just create new %APPDATA%\pip\pip.ini and content of custom repository:

[install]
find-links = https://<login>:<password>@your.repo.com/custom/url

参考: https://pip.pypa.io/en/stable /user_guide/#config-file

这篇关于Python-在Windows中找不到pip.ini或pip.conf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆