V
V
Vladimir Kuts2018-01-26 08:52:34
linux
Vladimir Kuts, 2018-01-26 08:52:34

Fix HTTP Error 403: SSL is required?

I'm building a container using Dockerfile via docker-compose.
In docker-compose.yml something like:

...
web:
     build: .
...

The base image is python:3
Dockerfile snippet:
FROM python:3

ADD requirements.txt /app/my_app/requirements.txt
...
pip install -r requirements.txt -i https://pypi.python.org/simple/

The process crashes on this error
Collecting filelike==0.4.1 (from -r /app/my_app/requirements.txt (line 12))
  Downloading filelike-0.4.1.tar.gz
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
    Traceback (most recent call last):
      File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lcylheiv/filelike/setup.py", line 4, in <module>
        distribute_setup.use_setuptools()
      File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 124, in _do_download
        to_dir, download_delay)
      File "/tmp/pip-build-lcylheiv/filelike/distribute_setup.py", line 193, in download_setuptools
        src = urlopen(url)
      File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
        response = meth(req, response)
      File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
        return self._call_chain(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
        result = func(*args)
      File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: SSL is required

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lcylheiv/filelike/
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r /app/my_app/requirements.txt -i https://pypi.python.org/simple/' returned a non-zero code: 1

What needs to be fixed at this image build step?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maniac_by, 2019-11-11
@maniac_by

I formatted some partition in fat32, mistaking it for a USB flash drive and now the system does not boot, I probably formatted the boot partition.

Or maybe you formatted the entire disk, ne?

V
Vladimir Kuts, 2018-01-26
@fox_12

Solved by changing the version of the filelike package in requirements.txt

...
filelike==0.5.0
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question