Closed splashcd closed 7 years ago
The proximate cause of the failure is the SSL validation errors, but I don't believe this is a problem with PyPI itself. For example, I am able to use the excellent httpie program to fetch those URLs without any SSL issues:
$ http https://pypi.python.org/simple/pytest-runner
HTTP/1.1 301 Moved Permanently
Accept-Ranges: bytes
Age: 30528
Cache-Control: max-age=600, public
Connection: keep-alive
Content-Length: 0
Date: Fri, 25 Aug 2017 20:44:03 GMT
Fastly-Debug-Digest: 01a7a78e1dbf1a0fd983c96796fdd87188bf23c3304cb8cc18cb43bfa5df9854
Location: /simple/pytest-runner/
Server: nginx/1.10.3
Strict-Transport-Security: max-age=31536000; includeSubDomains
Via: 1.1 varnish
Via: 1.1 varnish
X-Cache: HIT, HIT
X-Cache-Hits: 1, 1
X-Clacks-Overhead: GNU Terry Pratchett
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Permitted-Cross-Domain-Policies: none
X-Served-By: cache-iad2137-IAD, cache-dfw1820-DFW
X-Timer: S1503693843.054143,VS0,VE0
X-XSS-Protection: 1; mode=block
This would probably be one of two things:
httpie
installed in this environment? What about from a web browser? If yes to both, try waiting awhile and trying again. certifi
from PyPI (I know, chicken-and-egg, you'll have to download it manually) resolves the problem; you could test that in an isolated virtual environment.I appreciate the feedback @jamadden
I'm not including pytest-runner
in my code, it is a dependency in log4mongo
, so I'll need to research. I'm running make via terminal on OSx 10.12.6
I'm running make via terminal on OSx 10.12.6
I happen to be on that platform too. The system certificate chain for /usr/bin/python2.7
works for me (as do the ones installed by MacPorts under /opt/local
). That is, they can all 'pip install log4mongo' without issue.
The interesting thing is that I can also run pip install log4mongo
without issue. It's only in the collect/download portion of the make where the issue pops up
If you can point us to the project you’re trying to build someone might be able to take a look at it.
https://github.com/splashcd/log4mongofail
Cloning and running make dev
should replicate the failure I'm seeing...
Oh, you didn't mention it involves docker. Doesn't the Dockerfile
run in the virtual machine? So the issue would be with that environment.
I did reproduce the problem with the supplied Dockerfile. As I suggested, installing certifi
first with RUN pip install certifi
fixed the issue:
Step 6 : RUN pip install certifi
---> Running in 5e5e77191024
Collecting certifi
Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
Installing collected packages: certifi
Successfully installed certifi-2017.7.27.1
You are using pip version 9.0.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 0154974335e2
Removing intermediate container 5e5e77191024
Step 7 : RUN pip install --compile -r requirements.txt
---> Running in 53aa4f364d29
Collecting pyyaml (from -r requirements.txt (line 1))
Downloading PyYAML-3.12.tar.gz (253kB)
Collecting log4mongo (from -r requirements.txt (line 2))
Downloading log4mongo-1.6.1.tar.gz
Collecting pymongo (from log4mongo->-r requirements.txt (line 2))
Downloading pymongo-3.5.1.tar.gz (1.3MB)
Installing collected packages: pyyaml, pymongo, log4mongo
Running setup.py install for pyyaml: started
Running setup.py install for pyyaml: finished with status 'done'
Running setup.py install for pymongo: started
Running setup.py install for pymongo: finished with status 'done'
Running setup.py install for log4mongo: started
Running setup.py install for log4mongo: finished with status 'done'
Successfully installed log4mongo-1.6.1 pymongo-3.5.1 pyyaml-3.12
...
(Although I later get an unrelated error:
...
Successfully installed log4mongo-1.6.1 pymongo-3.5.1 pyyaml-3.12
You are using pip version 9.0.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 3c20f4f0e9ab
Removing intermediate container 53aa4f364d29
Step 8 : RUN pip install --compile .
---> Running in c9651c349be1
Processing /tmp
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/test.egg-info
writing requirements to pip-egg-info/test.egg-info/requires.txt
writing pip-egg-info/test.egg-info/PKG-INFO
writing top-level names to pip-egg-info/test.egg-info/top_level.txt
writing dependency_links to pip-egg-info/test.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/test.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
error: package directory 'log4mongofail' does not exist
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-cl5NAw-build/
)
Now, whether installing certifi
is the blessed way to set up the cert chain on Alpine Linux, I have no idea. But it does work.
Oh, and the reason pip install certifi
worked, but installing pytest-runner
didn't is because pytest-runner
is listed in the setup_requires
(not install_requires
) data for log4mongo, and that's processed by setuptools, not pip, and they obviously handle SSL differently. So another way to fix this specific issue would be to install pytest-runner
first before attempting to install log4mongo.
Thank you @jamadden and I apologize for not previously mentioning docker.
Your solution gets me back on track. Not sure why the build decided to break this week, as I've been building it over the past 6 months.
Happy to help.
Not sure what the root of this issue is here, but hopefully the error output provided with enable you to assist me with resolving the issue I receive when trying to
make
my project.