conf文件以使用https

conf文件以使用https

本文介绍了更新pip.conf文件以使用https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在配置pip.conf文件以规定PIP应该从以下位置下载文件时遇到问题 https://pypi.python.org/simple/而不是 http://pypi.python.org/simple/

I am having trouble configuring my pip.conf file to stipulate that PIP should look for downloads fromhttps://pypi.python.org/simple/ rather than http://pypi.python.org/simple/

我有一个相关问题发布了 PIP找不到满足SQLAlchemy要求的任何下载,其中几个人诊断出问题所在.但是我在解决方案上遇到了麻烦.

I have a related question posted PIP Could not find any downloads that satisfy the requirement SQLAlchemy where a couple of people diagnosed what was going wrong. However I am having trouble putting in place the solution.

我使用/home/user/.pip/pip.conf的pip.conf文件. > pip配置文件文档我添加了以下内容.文件中没有其他内容.

I opend my pip.conf file located at /home/user/.pip/pip.conf using the pip config file documentation I added the below. There is nothing else in the file.

[global]
timeout = 60
find-links = https://pypi.python.org/simple/

[install]
find-links = https://pypi.python.org/simple/

保存出口后,没有任何变化.我仍然无法运行命令,例如pip install

After saving an exiting there is no change. I still cannot run commands such as pip install

$ sudo pip install SQLAlchemy
Downloading/unpacking SQLAlchemy
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement SQLAlchemy
No distributions at all found for SQLAlchemy
Storing complete log in /home/user/.pip/pip.log

我的设置

  • Ubunto 12.04 VM

推荐答案

您应在配置中使用index-url = https://pypi.python.org/simple/而不是find-links.这将取代默认值,而不仅仅是添加另一个选项(find-links会执行此操作).

You should use index-url = https://pypi.python.org/simple/ rather than find-links in your config. This will replace the default rather than just adding another option (which is what find-links does).

这篇关于更新pip.conf文件以使用https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 02:09