Anaconda TensorFlow Installation Error "HTTP"How to fix? - python

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.

Related

Can't install anything in the environment I have created

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.

CondaHTTPError while creating the environment in linux

I am using linux aarch64 architecture and I try to create an environment after installing the miniconda in the linux. But I got condahttp error. This is my first time installing miniconda in linux and create environment in linux.
May I know how can I solve this issue? Does it needs to create any profile.h in miniconda ?
(base) su#L2:~$ conda create --name env1 python=2.7
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk gs/main/linux-aarch64/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.
'https://repo.anaconda.com/pkgs/main/linux-aarch64'

Unable to install TensorFlow in Python Virtual Environment

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.

conda error ssl certificate : HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443

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.

unable to "conda install 'anything' " with Anaconda3 ver 4.3.1 on Windows 10 x64 computer

I just bought a new Win10 laptop and installed Anaconda 4.3.1 which has the default Python 3.6. According to your instructions on: https://docs.continuum.io/anaconda/pkg-docs, I should be able to install Python 3.5.2 with the following command in the Anaconda prompt window - conda install python3.5.2 but I keep getting error messages that this url can not be found, even after frequent retries. The exact error message is as follows:
PS C:\Users\clive> conda install python=3.5.2
Fetching package metadata ...
CondaHTTPError: HTTP None None for url https://conda.anaconda.org/anaconda-fusion/win-64/repodata.json
Elapsed: None
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.
SSLError(SSLError(SSLError("bad handshake: Error([('asn1 encoding routines', 'ASN1_item_verify', 'EVP lib'), ('SSL routines', 'ssl3_get_server_certificate',
'certificate verify failed')],)",),),)
How do I install Python 3.5?
add
ssl_verify: False
in .condarc

Categories