Urllib2.HTTPError: HTTP Error 403: SSL required when installing nltk == 2.0.5

When setting nltk == 2.0.5, I get the error urllib2.HTTPError: HTTP Error 403: SSL is required . Actually, I am trying to install newspaper , but trying to install this package fails.

Minimum Docker file to reproduce the problem:

 FROM ubuntu:16.04 RUN apt-get update RUN apt-get install -y python-pip # problem occurs with or without the following line RUN pip install --upgrade pip CMD ["pip", "install", "nltk==2.0.5"] 
+7
pip nltk
source share
2 answers
  • wget https://pypi.python.org/packages/source/d/nltk/nltk-2.0.5.tar.gz
  • tar -xzf nltk-2.0.5.tar.gz
  • change DEFAULT_URL from http to https in nltk-2.0.5/distribute_setup.py
  • pip install this directory, or if you trust, I did the same: pip install https://s3-us-west-2.amazonaws.com/jdimatteo-personal-public-readaccess/nltk-2.0.5-https-distribute.tar.gz

Edit

If the wget link is broken, download ntlk 2.0.5 from pypi

+9
source

PyPI disabled API access without HTTPS

You can use:

pip install xxxx -i https://pypi.python.org/simple/

From: fooobar.com/questions/848333 / ...

-one
source

All Articles