无法使用pip安装pexpect

问题描述 投票:1回答:1

我无法使用pip安装pexpect。这是错误:

$ sudo -H pip install pexpect
Collecting pexpect
Could not find a version that satisfies the requirement pexpect (from 
versions: )
No matching distribution found for pexpect

$ sudo -H pip install --upgrade pip
Requirement already up-to-date: pip in /Library/Python/2.7/site- 
packages
$ python --version
Python 2.7.10

有人可以指出我可能是什么问题吗?谢谢

我也试过brew和easy_install。他们都没有工作:

$ sudo -H easy_install pexpect

Searching for pexpect
Reading https://pypi.python.org/simple/pexpect/
Download error on https://pypi.python.org/simple/pexpect/: [SSL: 
TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 
-- Some packages may not be found!
Couldn't find index page for 'pexpect' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: 
TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 
-- Some packages may not be found!
No local packages or download links found for pexpect
error: Could not find suitable distribution for 
Requirement.parse('pexpect')

$ brew install pexpect
Error: No available formula with the name "pexpect"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

我检查了网站:https://pypi.python.org/simple/pexpect/。我没有看到python 2.7版本的文件。这可能是原因。有谁知道如何获得Python 2.7或任何其他解决方案的pexpect。

python pip pexpect
1个回答
0
投票

我在全新安装时发现一个奇怪的结果。在我运行python一次之前,我无法使用pip3安装任何东西。 Ran python -V然后没有问题。

© www.soinside.com 2019 - 2024. All rights reserved.