python - pip,如何删除死索引基 url

标签 python pip

当我尝试使用 pip 安装包时,它首先尝试从一个不再存在的 url 中获取,这会导致以下错误

Cannot fetch index base URL http://xyz.xxx:8080/simple/

但它继续从 pypi 下载并安装包。我想摆脱这个索引基 url,我不想每次都看到这个消息。我不记得我是如何添加这个 url 但它在某个时候是一个有效的私有(private)包索引。我已经从/etc/hosts 文件中删除了 url,但 pip 仍然尝试从该位置获取包。

最佳答案

看起来有一个 pip 配置文件,您在其中添加了 URL。引自 docs :

The names and locations of the configuration files vary slightly across platforms.

On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf

On Windows, the configuration file is: %HOME%\pip\pip.ini

关于python - pip,如何删除死索引基 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18880158/

相关文章:

python - 加载大 pickle 时,Flask 应用程序中的 Google App Engine gunicorn 工作超时?

python - 如何告诉 pip 安装测试依赖项?

python - 如何比较需求文件和实际安装的 Python 模块?

python - Dockerfile RUN合并pip命令

python - Feedparser(和 urllib2)问题 : Connection timed out

python - 以 root 身份运行 twistd,找不到模块

python - 为什么 sys.path 是一个列表?

python - 滚动应用函数必须是实数,而不是Nonetype

python - 在 python 中安装模块 - pip、distribute、nose、virtualenv

python - Virtualenv 没有安装 pip