hesussavas / corners_stats

Statistical project on soccer's corners
40 stars 2 forks source link

SSL certificate error when running `make start_scraping` #1

Closed djamshed closed 7 years ago

djamshed commented 7 years ago

I am fairly new to python, not sure if this is a general question or something to be configured in makefile/project settings.

$ python --version
Python 3.6.0 :: Anaconda custom (x86_64)

$ docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:31:53 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:51:55 2017
 OS/Arch:      linux/amd64
 Experimental: true

$ make start_scraping
docker build \
        --file=Dockerfile \
        -t corners/bash:dev \
        .
Sending build context to Docker daemon  64.43MB
Step 1/8 : FROM python:3.6
 ---> 955d0c3b1bb2
Step 2/8 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends     python-pip
 ---> Using cache
 ---> f8c677b2cb2a
Step 3/8 : COPY requirements.txt /tmp/
 ---> Using cache
 ---> b5aca624550d
Step 4/8 : ENV MPLBACKEND "agg"
 ---> Using cache
 ---> af003d820c5e
Step 5/8 : RUN pip install -r /tmp/requirements.txt
 ---> Running in 116e869d3685
Collecting matplotlib==2.0.2 (from -r /tmp/requirements.txt (line 1))
  Could not fetch URL https://pypi.python.org/simple/matplotlib/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping
  Could not find a version that satisfies the requirement matplotlib==2.0.2 (from -r /tmp/requirements.txt (line 1)) (from versions: )
No matching distribution found for matplotlib==2.0.2 (from -r /tmp/requirements.txt (line 1))
The command '/bin/sh -c pip install -r /tmp/requirements.txt' returned a non-zero code: 1
make: *** [bash-build] Error 1
hesussavas commented 7 years ago

I think this is the problem of your environment and it's not due to the bugs here.

My advice for you: change 11th line in Dockerfile with this code RUN pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org -r /tmp/requirements.txt

This would probably solve your problem.