$ pip3 install django
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after
connection broken by 'SSLError(SSLError(185090184, '[X509] no certificate or crl found (_ssl.c:3732)'),)': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(185090184, '[X509] no certificate or crl found (_ssl.c:3732)'),)': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(185090184, '[X509] no certificate or crl found (_ssl.c:3732)'),)': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(185090184, '[X509] no certificate or crl found (_ssl.c:3732)'),)': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(185090184, '[X509] no certificate or crl found (_ssl.c:3732)'),)': /simple/django/
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
I have tried various solutions. I installed python3.7 and then tried but same.
I also tried this but the result was also same.
$ sudo apt-get install python3-setuptools ca-certificates
and same thing happens when I install django in a venv. Same goes for the installing a specific version of django.
I am using Ubuntu, yet, i solved this just running updates, then fixing dpkg configure -a, it seems installed all the certificates, then upgrade.
Related
Dockerfile:
FROM python:3.8-slim-buster
WORKDIR /main
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD python manage.py runserver
In my cmd/terminal:
E:\Satya_Django_TODO_APP\todo>docker build -t my_image --rm .
[+] Building 95.5s (8/9)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/python:3.8-slim-buster 2.2s
=> [1/5] FROM docker.io/library/python:3.8-slim-buster#sha256:0b92aced9b0e52b16870a7c09 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 28.89kB 0.0s
=> CACHED [2/5] WORKDIR /main 0.0s
=> CACHED [3/5] COPY requirements.txt requirements.txt 0.0s
=> ERROR [4/5] RUN pip3 install -r requirements.txt 93.0s
------
> [4/5] RUN pip3 install -r requirements.txt:
#8 13.02 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f04029205e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/aioredis/
#8 15.23 Collecting aioredis==1.3.1
#8 25.24 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c4c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl
#8 35.75 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c730>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl
#8 46.77 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7c910>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl
#8 58.78 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7cb20>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl
#8 72.80 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7cca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl
#8 82.81 ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/b0/64/1b1612d0a104f21f80eb4c6e1b6075f2e6aba8e228f46f229cfd3fdac859/aioredis-1.3.1-py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0402d7ce50>: Failed to
establish a new connection: [Errno -3] Temporary failure in name resolution'))
#8 82.81
------
executor failed running [/bin/sh -c pip3 install -r requirements.txt]: exit code: 1
why my connection is not establishing ? i haven't found any exact answer till now
The gitlab build fails with the following error:
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/asgiref/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/asgiref/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/asgiref/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/asgiref/
ERROR: Could not find a version that satisfies the requirement asgiref (from versions: none)
ERROR: No matching distribution found for asgiref
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
My Dockerfile is the following:
FROM registry.ubitech.eu/public-group/ubitech-public-registry/python:3.8
COPY manage.py gunicorn-cfg.py requirements.txt ./
COPY core core
COPY routers routers
COPY data_utilities data_utilities
COPY datasets datasets
COPY monitoring monitoring
RUN pip install -r requirements.txt
COPY cron_3.0pl1-137_amd64.deb ./
RUN dpkg -i cron_3.0pl1-137_amd64.deb
RUN mkdir logs
RUN touch logs/onenet_dashboard.log
EXPOSE 5005
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]
It is the first time that the build fails. Any idea of what is going wrong here?
I am building my first docker install as part of learning django. I have my docker install working. docker info is ok. and hello-world says successfull. But when I run the Dockerfile suggested by the turorial in my Django 3.0 Pro Book by Will Vincent. I get what look like a network dns error.
################
Error:
Step 6/7 : RUN pip install pipenv && pipenv install --system
---> Running in 585e5020f53a
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f339144df10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3391f05a90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3391f05e90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3391f05ad0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f33915ddd90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/
ERROR: Could not find a version that satisfies the requirement pipenv (from versions: none)
ERROR: No matching distribution found for pipenv
The command '/bin/sh -c pip install pipenv && pipenv install --system' returned a non-zero code: 1
####################
Dockerfile try to build:
Pull base image
FROM python:3.7
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /code
# Install dependencies
COPY Pipfile Pipfile.lock /code/
RUN pip install pipenv && pipenv install --system
# Copy project
COPY . /code/
It is failing on the RUN pip install.... line.
I have added dns nameserver entries directly into my /etc/resolver.conf file as other have suggested in my search here. not worked.
I assume there is some issue within Docker trying to run pip in the container? This is my first Docker install so exhausted search for answer.
On OS version Centos8
Thanks
bill sanderson
Ok, we can try a couple of things. First thing I would do:
In the Dockerfile add this(with google's dns):
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && pip install pipenv && pipenv install --system
It is important to do in the same RUN command.
Another option is:
docker build --network=host -t yourimage:yourversion .
I had the same issue last night - and this morning. Even after rebooting and trying to stop/start the service. This is on my Windows 10.
I did notice running a docker info output the following error:
Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified
As detailed here - https://stackoverflow.com/a/74098179/405022
Having ran wsl --shutdown and being prompted to restart docker desktop, I then proceeded to try my docker build.
docker build -f ./sources/service1/deploy/dev.dockerfile ./sources/service1 -t acme-app.service1-py:latest --no-cache --progress=plain
Coincidence? It worked for me in the end.
I am getting the following error while trying to install Django for python3
(base) C:\ShashiPractice ProjectStudent>pip install django
Collecting django
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
...
...
...
y failed: self signed certificate in certificate chain (_ssl.c:1056)')))
You made a small mistake.
The pip command is as follows:
pip install Django
Note that the the D in Django is in block letter. Hope this solves your problem :)
When i am trying to install Graphlab Create, it's just retrying connections. I have healthy broadband wifi connection at my home (NO proxy).
Error: (graphlab)ankit#ankit21:~$ pip install graphlab-create==0.9.1
Collecting graphlab-create==0.9.1
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd6a16ae850>, 'Connection to 192.168.16.253 timed out. (connect timeout=15)')': /simple/graphlab-create/
The proxy 192.168.16.253 is proxy of my college internet. But i have changed the setting in networks setting to automatic proxy. Others installs in terminal are working properly only this is having the problem.
You need your specific academic license key, but trying to install the older version automatically updates your install to 1.7.1. If you choose to copy your code from the installation instructions and you remove --upgrade, and change to 0.9.1 it will still not work.
pip install --no-cache-dir https://get.dato.com/GraphLab-Create/0.9.1/your_key/GraphLab-Create-License.tar.gz
You can obtain your key for the latest version when you register with GraphLab on the Dato website. The academic license is free for each user for one year.
On the official site (https://turi.com/download/install-graphlab-create.html?email=**YOU**%40gmail.com&key=**7C68-...-D3D7**) we have:
Registered email address: YOUR_ADDRESS
Product key: YOUR_PRODUCT_KEY
Installing with dependencies:
Install Anaconda
bash /path to download file/Anaconda2-4.0.0-Linux-x86_64.sh
Create conda environment
conda create -n gl-env python=2.7 anaconda=4.0.0
source activate gl-env
Ensure pip version >= 7
conda update pip
Install GraphLab Create
pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/YOUR_ADDRESS/YOUR_PRODUCT_KEY/GraphLab-Create-License.tar.gz
Ensure installation of IPython and IPython Notebook
conda install ipython-notebook