Docker build error Cannot fetch index base URL http://pypi.python.org/simple/
You have a pip problem, not a docker problem, you need to add pip install --index-url https://pypi.python.org/simple/ --upgrade pip
to your docker file:
FROM jonasbonno/rpi-grovepi
RUN pip install --index-url https://pypi.python.org/simple/ --upgrade pip
RUN hash -r
RUN pip install requests
RUN git clone https://github.com/keyban/fogservice.git #update
ENTRYPOINT ["python"]
CMD ["fogservice/service.py"]
You can find the solution here: pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/
Python pip error: Cannot fetch index base URL https://pypi.python.org/simple/
Maybe try with sudo -E
:
-E The -E (preserve environment) option indicates to the secu‐
rity policy that the user wishes to preserve their existing
environment variables. The security policy may return an
error if the -E option is specified and the user does not
have permission to preserve the environment.
On the assumption that your proxy settings are set in your normal user environment, but not the one you get when you run sudo
.
pip cannot install anything
This is the full text of the blog post linked below:
If you've tried installing a package with pip recently, you may have encountered this error:
Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
Cannot fetch index base URL https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/Django/1.5.1: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/Django/1.5.1 when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
Could not find any downloads that satisfy the requirement Django==1.5.1 (from -r requirements.txt (line 1))
No distributions at all found for Django==1.5.1 (from -r requirements.txt (line 1))
Storing complete log in /Users/paul/.pip/pip.log
This seems to be an issue with an old version of OpenSSL being incompatible with pip 1.3.1. If you're using a non-stock Python distribution (notably EPD 7.3), you're very likely to have a setup that isn't going to work with pip 1.3.1 without a shitload of work.
The easy workaround for now, is to install pip 1.2.1, which does not require SSL:
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install
If you are using EPD, and you're not using it for a class where things might break, you may want to consider installing the new incarnation: Enthought Canopy. I know they were aware of the issues caused by the previous version of OpenSSL, and would imagine they are using a new version now that should play nicely with pip 1.3.1.
Error while installing with Python “pip”: Cannot fetch index base URL http://
You can try installing django-storages on its own.. try this?
sudo pip install https://bitbucket.org/david/django-storages/get/def732408163.zip
Related Topics
How to Find Unused Functions in Python Code
Python Worker Failed to Connect Back
How to Isolate Everything Inside of a Contour, Scale It, and Test the Similarity to an Image
Python: Sort Function Breaks in the Presence of Nan
Why Should I Close Files in Python
Why Does Indexing Numpy Arrays with Brackets and Commas Differ in Behavior
Fix Not Load Dynamic Library for Tensorflow Gpu
What's a Good Equivalent to Subprocess.Check_Call That Returns the Contents of Stdout
Weird Behavior: Lambda Inside List Comprehension
Python How to Read N Number of Lines at a Time
Most Efficient Way to Search the Last X Lines of a File
How to Grab Number After Word in Python
Generating Sublists Using Multiplication ( * ) Unexpected Behavior
Reverse a Get_Dummies Encoding in Pandas
How to Install a Python Package from Within Ipython
Split an Integer into Digits to Compute an Isbn Checksum
Panda's Dataframe - Renaming Multiple Identically Named Columns