Salutations!
I am getting an error when attempting to install TensorFlow in a Python virtualenv. I created a Python 3.7 virtual environment for a data project that I'm working on. I tried installing TensorFlow into that environment and I received the following error:
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/34/d5/ce8c17971067c0184c9045112b755be5461d5ce5253ef65a367e1298d7c5/tensorflow-2.1.0-cp37-cp37m-win_amd64.whl (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)))
I'm guessing this may be due to me being on a work network, which may have firewall restrictions, but I am not totally sure.
Any insight would be greatly appreciated.
Gratitude!
You can try either the command,
pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade tensorflow
or the Command,
pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade --proxy=127.0.0.1:3128 tensorflow
For more information, please refer this Github Issue and this Stack Overflow Issue.
Hope this helps. Happy Learning for Tensorflow.
Related
I have set up a new environment on conda.
Once it was created, I disabled threading so that the performance of the software I would be using will be maximised using:
conda env config vars set OMP_NUM_THREADS=1
conda env config vars set NUMEXPR_MAX_THREADS=1
I then tried to install the software and got the error
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.
Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
I though this could be specific to the software.
To test this, I tried installing python with
conda install -c conda-forge python
I got the same error here
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.
Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
It seems to be an issue with the environment, but I have set up other environments on this machine before and never had this issue.
Does anyone know what could be causing this issue?
I have now resolved this!
If anyone else has the same issue, going back into the base environment and then using "conda install -n name_of_environment python" worked.
I am trying to install Dtale in jupyter notebook. Due to the firewall restrictions, I cannot install it online. I tried to download the archive file dtale-2.2.0.tar.gz and ran this command inside the jupyter notes.
pip install <path>/dtale-2.2.0.tar.gz
This fails as it could not find pypandoc. Then I downloaded the pypandoc-1.7.5.tar.gz and ran
pip install <path>/pypandoc-1.7.5.tar.gz.
But this time I get the error:
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/d2/04/08841501db81bceb7a86a98dea7c12b0185fcc69bfdf1aea266f727d1d7e/poetry_core-1.0.8-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
I know the host is unreachable due to the firewall, that is the reason why I downloaded the package. Can someone guide me through how to install the packages from the .gz archive file?
Thanks
this error tells you that there is a pkg in dependencies that can NOT be downloaded.
its name is poetry-core, so you should download and install it manually.
here is a url for it: https://files.pythonhosted.org/packages/d2/04/08841501db81bceb7a86a98dea7c12b0185fcc69bfdf1aea266f727d1d7e/poetry_core-1.0.8-py2.py3-none-any.whl
in case you can't download it too due to your firewall, you can use VPN.
in case you can't do that either, then you can download it from this url:
https://www.mediafire.com/file/kpnfupmf5px84um/poetry_core-1.0.8-py2.py3-none-any.whl/file
I have downloaded and re-uploaded it
I was trying to install Tensorflow by creating an environment but I got an error because I my Self-Signed Certificate. I fixed this once with pip but I don't know how to do that with Anaconda.
The error is:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))
I tried to find a command to fix that but could not find one. I am supposed to be able to create the environment without any issue.
I have searched on Internet and found something related to Conda issue.
Before going to 1) and 2) steps, just type
conda config --set ssl_verify no
Then do following:
Create new environment by typing(optional)
conda create -n tensorflow pip python=3.7
activate tensorflow
Install Tensorflow 1.9
pip install --ignore-installed --upgrade tensorflow==1.9
I didn't get any error with this. If you have errors, comment down below.
no matter what I do I get this error
C:\Users\MyPc>conda update --all
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/win-64/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I have searched all the internet , re-installed anaconda and did whatever is there on suggestion but this issue is still there.
Windows 10
C:\Users\MyPc>anaconda --version
anaconda Command line client (version 1.7.2)
C:\Users\MyPc>conda --version
conda 4.5.12
In my case I got this kind of error message when I try to run this command
conda install tensorflow
here is the Error message
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to download and install packages.
Exception: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
This is the solution for that
step 01
go to your installation path of anaconda3
step 02
now go to the this file path
anaconda3\Library\bin
step 03
now select this DLL file and copy that
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
step 04
after that go to this file path and paste that to inside of that folder
anaconda3\DLLs
I had this same issue, and the thing that fixed it for me was to install an earlier 32-bit version of Conda. For some reason the newer 64-bit version seemed prone to this error. You can find an earlier version of Conda here:
https://repo.continuum.io/archive/
You should search for an Anaconda3 version that only has x86, not x86_64.
I had the same problem, the simple solution is:
open anaconda navigator from start menu, then run CMD.exe Prompt, and install from there, that's it.
My institution runs a filter that makes less safe sites inaccessible. One site that I can reach just fine using a browser is
https://pypi.python.org/simple/waitress/
and yet if I run pip -vvv install waitress (the problem occurs with all packages, not just waitress) from an Anaconda command prompt I get:
Could not fetch URL https://pypi.python.org/simple/waitress/:
connection error: HTTPSConnectionPool(host='pypi.python.org', port=443):
Max retries exceeded with url: /simple/waitress/ (Caused by
NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x00000000050FD400>:
Failed to establish a new connection: [WinError 10061]
No connection could be made because the target machine
actively refused it',)) - skipping
I can request to selectively open the necessary URLs, but in this case it appears that port 443 at pypi.python.org is already open.
Can you explain this puzzle? Why is pip unable to reach a site that a browser (on the same machine) can reach?
This a simple solution using ssl, since the release of pip 10.0, you should be able to fix this permanently just by upgrading pip itself:
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip waitress
Let me know if works