Reputation: 161
I am not able to install pexpect using pip. Here is the error:
$ 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
Could someone please point me what could be the issue? Thanks
I tried brew and easy_install as well. None of them worked:
$ 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.
I checked the site: https://pypi.python.org/simple/pexpect/ . I do not see files for python 2.7 version. That could be the reason. Does anyone know how can i get pexpect for Python 2.7 or any other solution.
Upvotes: 2
Views: 9813
Reputation: 601
Like 'Ray Mo', upgrading pip2 was the solution for me. It seems that pexpect now has a version dependency on pip.
However, pip dropped support for python2 from version 21 onwards, so you need to install version 20 e.g.
sudo python2 -m pip install --upgrade pip>=20,<21
Now pexpect will install.
Upvotes: 0
Reputation: 34
pip was not installing till it was upgraded.
I first had to update pip
with the following command:
sudo pip install --upgrade pip
If pip
does not properly upgrade
on the first attempt, rerun the command.
Once pip
has upgraded successfully, installing pexpect
is a piece of cake.
Upvotes: -1
Reputation: 693
I found an odd result on a fresh install. I was unable to install anything with pip3 until I ran python once. Ran python -V
and then had no problems.
Upvotes: 0