My Docker file is
FROM python:3
ADD myapp.py /
RUN pip3 install tensorflow-gpu
RUN pip3 install numpy
RUN pip3 install pandas
CMD ["python3", "./myapp.py]
When I build the docker image using
docker build -t gaurav .
I get the following errors
Step 4/5 : RUN pip3 install tensorflow-gpu
---> Running in 8f938c75e2e0
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 0x7fae543d7cd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
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 0x7fae543d79d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
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 0x7fae543d7220>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
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 0x7fae543d7640>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
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 0x7fae543d7790>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/tensorflow-gpu/
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu (from versions: none)
ERROR: No matching distribution found for tensorflow-gpu
The command '/bin/sh -c pip3 install tensorflow-gpu' returned a non-zero code: 1
Can you help me here, I want to install all these packages, but I can't get past these errors.
https://github.com/tensorflow/tensorflow/issues/33374 - tensorflow is not available for python3.8 so you have to use python image with version 3.7 or lower:
FROM python:3.7
As stated here Tensorflow - requirements.
Tensorflow is supported only Python 3.5–3.7
Related
I want to install flask-sqlalchemy within the virtual environment on my ubuntu subsystem (WSL) on Windows 11, using the following command:
pip install flask-sqlalchemy
however i recieve an error in console window.
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 0x7ff5c27dff10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask-sqlalchemy/
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 0x7ff5c2620280>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask-sqlalchemy/
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 0x7ff5c2620520>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask-sqlalchemy/
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 0x7ff5c26206d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask-sqlalchemy/
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 0x7ff5c2620880>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask-sqlalchemy/
ERROR: Could not find a version that satisfies the requirement flask-sqlalchemy (from versions: none)
ERROR: No matching distribution found for flask-sqlalchemy
I think it is related with network connection in my Ubuntu subsystem. I try on Standalone Linux system and it seems to be work. How i can solve this issue?
i finnaly resolve my issue. I post below steps to solve this problem.
I checked my fireewall settings. It was not an issue.
i dont use proxy so i skipped the proxy issue.
i checked ping from the console window
ping google.com
it displayed
ping: google.com: Temporary failure in name resolution
I found a solution. Seems like my DNS server can't find an address associated to the URL i am passing. I got errors because the resolv.conf file was not set up in my Ubuntu Subsystem.
solution:
in wsl Ubuntu Linux type commamnd
sudo nano /etc/resolv.conf
add nameserver and save file
nameserver 8.8.8.8
i'm trying to run some machine learning environment on Kaggle, but i can't install the packages... I Need to install stable-baselines3[extra] but i cant. I tried with
pip install stable-baselines3[extra]
but i get this error:
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 0x7f8159233e50>: Failed to establish a new connection: [Errno -3] Temporary failure
in name resolution')': /simple/stable-baselines3/
How to resolve this?
Running Ubuntu 18.04 LTS as WSL2 on Win10, I need to create an environment to install Devito on my system. So, in a root folder of this project I do:
(base) quant#NB-W-I-NIKONENKO:~/devito$ conda env create -f environment-dev.yml
and get this:
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/home/quant/anaconda3/envs/devito/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/quant/devito/condaenv.r9s6c4x4.requirements.txt']
Pip subprocess output:
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from -r /home/quant/devito/requirements.txt (line 1)) (21.2.4)
Pip subprocess error:
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 0x7f27c959d970>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
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 0x7f27c959d5b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
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 0x7f27c959df10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
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 0x7f27c95c5100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
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 0x7f27c95c52b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
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 0x7f27c8f2bc10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7f27c8f2be20>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7f27c8f32040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7f27c8f321c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7f27c8f32370>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from versions: none)
ERROR: No matching distribution found for numpy>1.16
failed
CondaEnvException: Pip failed
The next installation commands should be:
source activate devito
which works, and the next:
pip install -e .
which shows the following:
Obtaining file:///home/quant/devito
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from devito==4.6.2+60.g9b765d0d6) (21.2.4)
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 0x7fa7509e1040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7fa750a4d9d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7fa750a4d880>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7fa750a4d190>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
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 0x7fa750a4dca0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from devito) (from versions: none)
ERROR: No matching distribution found for numpy>1.16
So, I can not install the package correctly and implement the final command:
conda update - all –yes
I noticed that base Python version is 3.7.6 and after the source activation python version is 3.9.7 (I am not sure if it helps but I really struggled with this problem).
Here is the link for installation instructions for the Devito
https://medium.com/#soulfoodpst/install-devito-on-windows-a-tool-for-automatic-programming-3def3949e5c8
I have a python project I want to package. I can package the project with python -m build just fine when connected to the internet.
When I disconnect and try the same command, I get an error about pip being unable to find the package wheel:
(my-venv) [me#my-host my-project]$ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=42, wheel)
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 0x7f5935bb4f10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a160>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a4c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
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 0x7f5935b5a670>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/wheel/
ERROR: Could not find a version that satisfies the requirement wheel
ERROR: No matching distribution found for wheel
This happens even if I install setuptools and wheel first.
How can I build my project without needing internet access at the time of building? Can I somehow make the isolated environment use my python cache?
i got these errors and warnings after step 6 of sudo docker-compose up
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/asn1crypto/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/asn1crypto/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/asn1crypto/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/asn1crypto/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/asn1crypto/
ERROR: Could not find a version that satisfies the requirement asn1crypto==0.24.0 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for asn1crypto==0.24.0 (from -r requirements.txt (line 1))
this is my Dockerfile codes:
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /todo_service
WORKDIR /todo_service
COPY /requirements.txt /todo_service
RUN pip install -r requirements.txt
COPY . /todo_service/
what should i do to up it without any warning and err?
Docker container seems to have a problem connecting or resolving the URLs. Go to /etc/default/docker (In Ubuntu Desktop package installed docker) and uncomment the following line.
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"