【问题标题】:how to fix " Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install " error如何修复“找不到满足安装要求的版本(来自版本:)找不到匹配的安装发行版”错误
【发布时间】:2019-11-03 07:22:11
【问题描述】:

我想将 tweepy 模块安装到我的 python 项目中。我阅读了文档以使用命令“pip install tweepy”。但它在命令提示符中显示错误。

C:\Python36>pip install tweepy
Collecting install
  Could not find a version that satisfies the requirement install (from versions: )
No matching distribution found for install

编辑-1

我尝试安装 python-twitter 模块,但出现了同样的错误。

C:\Python36>pip install python-twitter -v
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Collecting install
  1 location(s) to search for versions of install:
  * https://pypi.python.org/simple/install/
  Getting page https://pypi.python.org/simple/install/
  Looking up "https://pypi.python.org/simple/install/" in the cache
  Returning cached "301 Moved Permanently" response (ignoring date and etag information)
  Looking up "https://pypi.org/simple/install/" in the cache
  Current age based on date: 345
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 345
  Analyzing links from page https://pypi.org/simple/install/
  Could not find a version that satisfies the requirement install (from versions: )
Cleaning up...
No matching distribution found for install
Exception information:
Traceback (most recent call last):
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\req\req_set.py", line 554, in _prepare_file
    require_hashes
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\req\req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "C:\Users\MOJO-J~1\AppData\Local\Temp\tmplke7w3ae\pip.zip\pip\index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for install

【问题讨论】:

  • 由于某种原因,您的 pip 版本似乎正在尝试安装“install”而不是“tweepy”。
  • 我可以模拟的唯一方法是pip install install tweepy,其中安装是双输入或粘贴两次。
  • 不,它不起作用。 C:\Python36>pip install install tweepy Collecting install Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install
  • 尝试用pip install --upgrade pip更新你的pip版本
  • 不,它显示相同的错误C:\Python36>pip install --upgrade pip Collecting install Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install

标签: python pip tweepy


【解决方案1】:

您似乎出于某种原因将pip 别名为pip install 命令。
您可能只运行pip tweepy 来实际运行pip install tweepy,但更好的方法是运行run pip via the Python interpreter。 Upgrading pip 这种方式也可以潜在地修复锯齿。

【讨论】:

    【解决方案2】:

    尝试了不同的方法,如pip3 install tweepy 和pip tweepy,就像上面建议的解决方案一样,但没有奏效。尝试升级和重新安装 pip 但仍然没有解决方案。不得不重新安装python环境。

    【讨论】:

      【解决方案3】:

      尝试在较低版本的python中安装。一些库不立即支持新版本的 python。

      【讨论】:

        猜你喜欢
        • 2021-02-21
        • 1970-01-01
        • 2018-02-18
        • 1970-01-01
        • 2022-08-23
        • 1970-01-01
        • 2017-09-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多