How can I install a specific version of pip via ea

2019-01-29 03:50发布

I am constantly getting the

Cannot fetch index base URL https://pypi.python.org/simple/

whenever I try to pip install anything with the most recent pip version.

I read on some other questions that pip was having SSL related issues in its latest version and recommended to install pip 1.2.1.

How do I install a specific version of pip via easy_install for example?

3条回答
爷、活的狠高调
2楼-- · 2019-01-29 03:52

You should be able to install pip with pip:

pip install --upgrade pip==1.2.1
查看更多
再贱就再见
3楼-- · 2019-01-29 03:55

Uninstall any previous installation of pip. Considering you are using system wide installation,

sudo apt-get remove python-pip

and also,

pip uninstall pip

Now,

sudo apt-get install python-setuptools
sudo easy_install pip==<specific version>
sudo pip install virtualenv

It's preferred to use virtual environment though.

查看更多
4楼-- · 2019-01-29 03:59

Based on your context, you can uninstall as above and then run:

sudo easy_install pip==1.2.1

No more pesky SSL errors.

查看更多
登录 后发表回答