我无法使用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版本的文件。这可能就是原因。谁知道如何在Python2.7或任何其他解决方案中获得pexpect。
发布于 2019-03-12 03:41:09
我发现了一个新安装的奇怪的结果。我无法用pip3安装任何东西,直到我运行了一次python。运行python -V,然后就没有问题了。
发布于 2019-09-03 01:21:19
在升级之前,pip不会安装。
首先,我必须使用以下命令更新pip:
sudo pip install --upgrade pippip在第一次尝试时未正确执行upgrade,请重新运行该命令。pip成功升级,安装pexpect就轻而易举了。https://stackoverflow.com/questions/50416753
复制相似问题