Python 根本找不到某些软件包的发行版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23222104/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 02:32:10  来源:igfitidea点击:

No distributions at all found for some package

pythondjango

提问by errakeshpd

error when installing some package but its actualy existing example django-ajax-filtered-fields==0.5

安装一些包时出错,但它实际存在的示例 django-ajax-filtered-fields==0.5

Downloading/unpacking django-ajax-filtered-fields==0.5 (from -r requirements.example.pip (line 13)) Could not find any downloads that satisfy the requirementdjango-ajax-filtered-fields==0.5(from -r requirements.example.pip (line 13)) No distributions at all foundfor django-ajax-filtered-fields==0.5 Storing debug log for failure in /home/pd/.pip/pip.log (peecs)pd@admin:~/proj/django/peecs$ pip install django-ajax-filtered-fields==0.5 --allow-unverified django-ajax-filtered-fields==0.5 Downloading/unpacking django-ajax-filtered-fields==0.5 Could not find any downloads that satisfy the requirement django-ajax-filtered-fields==0.5 Some externally hosted files were ignored (use --allow-external django-ajax-filtered-fields to allow). Cleaning up... No distributions at all found for django-ajax-filtered-fields==0.5 Storing debug log for failure in /home/pd/.pip/pip.log

下载/解包 django-ajax-filtered-fields==0.5(来自 -r requirements.example.pip(第 13 行)) 找不到任何满足要求的下载django-ajax-filtered-fields==0.5(来自 -r requirements.example.pip (line 13)) 根本找不到分布对于 django-ajax-filtered-fields==0.5 将失败的调试日志存储在 /home/pd/.pip/pip.log (peecs)pd@admin:~/proj/django/peecs$ pip install django-ajax-filtered -fields==0.5 --allow-unverified django-ajax-filtered-fields==0.5 下载/解包 django-ajax-filtered-fields==0.5 找不到任何满足要求的下载 django-ajax-filtered-fields= =0.5 一些外部托管的文件被忽略(使用 --allow-external django-ajax-filtered-fields 允许)。正在清理...根本找不到 django-ajax-filtered-fields==0.5 的发行版在 /home/pd/.pip/pip.log 中存储失败的调试日志

采纳答案by errakeshpd

I got the solution ,Try with --allow-unverified

我得到了解决方案,尝试使用--allow-unverified

syntax: pip install packagename=version --allow-unverified packagename

语法:pip install packagename=version --allow-unverified packagename

Some package condains insecure and unverifiable files. it will not download to the system . and it can be solved by using this method --allow-unverified. it will allow the installation.

一些包包含不安全和无法验证的文件。它不会下载到系统。并且可以通过使用此方法--allow-unverified来解决。它将允许安装。

Eg:pip install django-ajax-filtered-fields==0.5 --allow-unverified django-ajax-filtered-fields

例如:pip install django-ajax-filtered-fields==0.5 --allow-unverified django-ajax-filtered-fields

回答by jk - Reinstate Monica

Inspecting the logs reveals the following line:

检查日志显示以下行:

less .pip/pip.log

Could not fetch URL https://pypi.python.org/simple/WSGIUtils/: connection error: [Errno1] _ssl.c:493: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

In an earlier version of the comment I attributed this behaviour to https://pypi.python.org, but this is not the issue, since I can contact this site (from another computer!) with firefox and all certificates are OK. So this is probably a problem of some installations of pip---I encounter it unter SLES 11 which has (among other things) the "oldstable" openssl-0.9.8.

在较早版本的评论中,我将此行为归因于https://pypi.python.org,但这不是问题,因为我可以使用 firefox 联系该站点(从另一台计算机!),并且所有证书都可以。所以这可能是某些 pip 安装的问题——我在 SLES 11 下遇到了它,它具有(除其他外)“oldstable”openssl-0.9.8。

回答by Martin F

Proxy Settings

代理设置

Still unsure if myissue has the same cause as with the OP, but one error message was the same:

仍然不确定我的问题是否与 OP 的原因相同,但一条错误消息是相同的:

  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Django
No distributions at all found for Django

Talking to a colleague exposed it was a site-security-based issue. The following commands were required:

与同事交谈后发现这是一个基于站点安全的问题。需要以下命令:

set https_proxy=*https proxy*
set http_proxy=*http proxy*
pip install Django

where *https proxy*and *http proxy*are appropriate URLs-with-ports for our site.

在哪里*https proxy**http proxy*是我们网站的合适的带有端口的 URL。

Downloading/unpacking Django
Installing collected packages: Django
Successfully installed Django
Cleaning up...

回答by snakey

Note that this error may also occure because you are using too old version of pip. Then it can be solved by:

请注意,此错误也可能是因为您使用的 pip 版本太旧。那么可以通过以下方式解决:

pip install --upgrade pip

You can check your version by:

您可以通过以下方式检查您的版本:

pip --version

回答by teardrop

Try upgrading pip. Version 7.1.2 does not have this issue.

尝试升级 pip。7.1.2 版没有这个问题。

easy_install pip==7.1.2

回答by geeksquad87

I did following to install Openpyxl in Python version 3.5 after the following error with command

在使用命令出现以下错误后,我在 Python 3.5 版中安装了 Openpyxl

pip install openpyxl --allow-unverified openpyxl

pip install openpyxl --allow-unverified openpyxl

DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting openpyxl
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000044AF080>, 'Connection to pypi
.python.org timed out. (connect timeout=15)')': /simple/openpyxl/
Operation cancelled by user

C:\Softwares\Python\Scripts>set https_proxy=My proxy

C:\Softwares\Python\Scripts>set https_proxy=我的代理

C:\Softwares\Python\Scripts>pip install openpyxl --allow-unverified openpyxl

C:\Softwares\Python\Scripts>pip install openpyxl --allow-unverified openpyxl

DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting openpyxl
  Downloading openpyxl-2.4.8.tar.gz (156kB)
    100% |████████████████████████████████| 163kB 3.7MB/s
Collecting jdcal (from openpyxl)
  Downloading jdcal-1.3.tar.gz
Collecting et_xmlfile (from openpyxl)
  Downloading et_xmlfile-1.0.1.tar.gz
Installing collected packages: jdcal, et-xmlfile, openpyxl
  Running setup.py install for jdcal ... done
  Running setup.py install for et-xmlfile ... done
  Running setup.py install for openpyxl ... done
Successfully installed et-xmlfile-1.0.1 jdcal-1.3 openpyxl-2.4.8

That worked! Thanks Martin F for your tip.

那行得通!感谢 Martin F 的提示。

回答by Eyal Ch

The only solution worked for me:

唯一的解决方案对我有用:

  1. uninstall pip (pip uninstall pip)
  2. download pip package from pypi (https://pypi.org/project/pip/)
  3. execute python setup.py install (not using easy_install)
  4. then you can install any package you want.
  1. 卸载点子(点子卸载点子)
  2. 从 pypi ( https://pypi.org/project/pip/)下载 pip 包
  3. 执行 python setup.py install (不使用easy_install)
  4. 然后你可以安装任何你想要的包。

回答by threeve

Lots of solutions to this, most effectively coming down to update PIP. On MacOS (Sierra), This was my solution:

对此有很多解决方案,最有效的是更新 PIP。在 MacOS (Sierra) 上,这是我的解决方案:

  • Download python3 installer of choice
  • Install Package (this includes a newer version of pip)
  • Remove old version of python from $PATHin ~/.bash_login(new one added by installer)
  • pip3 install packagename(no sudo)
  • 下载选择的python3安装程序
  • 安装包(这包括较新版本的 pip)
  • $PATHin 中删除旧版本的python ~/.bash_login(安装程序添加的新版本)
  • pip3 install packagename(没有须藤)

After that I was still prompted to update pip and did so: pip3 install --upgrade pip

在那之后,我仍然被提示更新 pip 并这样做了: pip3 install --upgrade pip

回答by Siddhant Tanpure

You can install the library manually:

您可以手动安装库:

git clone https://github.com/roddds/django-ajax-filtered-fields.git

git 克隆https://github.com/roddds/django-ajax-filtered-fields.git

then go to the folder:

然后转到文件夹:

pip install .

点安装。