CondaHTTPError while creating the environment in linux - python

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'

Related

Installing requests package breaks anaconda installation

I'm having an issue where when I install the requests package on a fresh anaconda install (onto an environment), it breaks my anaconda in a way where I cannot download any further packages due to an HTTP error.
The process I've gone through a number of times now is:
Uninstall anaconda (using anaconda-clean and add/remove programs)
Re-install anaconda
Run conda update conda on my base environment
Run conda create -n auckland-index python=3.7 to create a new environment
I install pandas with conda install pandas to make sure I can download packages in the new environment
I then run conda install requests to install requests, which downloads and installs successfully
Then when I try to install any other packages I get the below CondaHTTPError across both base and new environments
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.
'https://repo.anaconda.com/pkgs/main/win-64'
I have tried installing requests before pandas and after other packages, but I get an CondaHTTPError always after installing requests.
I have tried the following from other stack questions to fix (of which none work):
Set ssl_verify: false in .condarc
Copy both libcrypto-1_1-x64.dll and libssl-1_1-x64.dll to the anaconda3/DLLs folder
I'm at a bit of a loss as to why installing requests is causing this issue, as I'm downloading it through the conda install command. This isn't a network issue either as the downloading and installing of packages was working before requests was installed. Once I have installed requests I cannot download any more packages for any environment.
Has anyone had this issue or know of a fix? Is this a bug?
EDIT: from each environment I have run conda list requests and python -c "import requests; print(requests.__spec__)", with the results below.
Base
# Name Version Build Channel
requests 2.22.0 py37_0
ModuleSpec(name='requests', loader=<_frozen_importlib_external.SourceFileLoader object at 0x00000284138E7FC8>, origin='%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\requests\\__init__.py', submodule_search_locations=['%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\requests'])
auckland-index
# Name Version Build Channel
requests 2.25.1 pyhd3eb1b0_0
ModuleSpec(name='requests', loader=<_frozen_importlib_external.SourceFileLoader object at 0x00000284138E7FC8>, origin='%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\requests\\__init__.py', submodule_search_locations=['%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\requests'])
EDIT 2: Adding path variables from base environment
['', '%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\python37.zip',
'%USERPROFILE%\\open-data-api',
'%USERPROFILE%\\Auckland-Index-Update',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\DLLs',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index',
'%USERPROFILE%',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\locket-0.2.1-py3.7.egg',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\win32',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\win32\\lib',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\Pythonwin',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\envs\\auckland-index\\lib\\site-packages\\IPython\\extensions',
'%USERPROFILE%\\.ipython',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\python37.zip',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\DLLs',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\lib',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32\\lib',
'%USERPROFILE%\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\Pythonwin']
Issue was caused by PYTHONPATH windows environment variable, once this was deleted problem was solved. Thanks to #merv for help getting there.

unable to update anything in conda

I have just installed the most recent Anaconda version (win 10 64bits) and I am now unable to update any package.
My condarc file contains my proxy settings. This used to work perfectly fine with the previous anaconda version.
proxy_servers:
http: http://myproxy.com:8080
https: https://myproxy.com:8080
But running conda update conda triggers an error:
Collecting package metadata (current_repodata.json): failed
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
What is the issue here? Arent my proxy setting written in the correct way?
Thanks!

Anaconda TensorFlow Installation Error "HTTP"How to fix?

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.

Conda environment from environment.yml - private package from git?

I use conda environment.yml for CircleCI continuous integration. It all works fine, but now I need to add a private package.
I install it from git via pip, but it can't access the page:
Could not install requirement SE from
https://github.com/organisation/research.git#egg=SE because of error 404
Client Error: Not Found for url:
https://github.com/organisation/research Could not install requirement
SE from https://github.com/organisation/research.git#egg=SE because of
HTTP error 404 Client Error: Not Found for url:
https://github.com/organisation/research for URL
http://github.com/organisation/research.git#egg=SE
So I wonder, how can I pass / setup github credentials to/in the conda environment?
Just to be clear, this package dependency is happily tested on CircleCI by itself...
Actually, CircleCi offers to add your SSH key in project settings.

How to install ipywidgets offline (from file)

So I am trying to install ipywidgets-0.0.1 into my Anaconda environment. I am running Anaconda3. Unfortunately, the machine I need to install it on does not have internet access.
The basic way to install the package is to run conda install ipywidgets, but of course this gives the following error:
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/p
ro/noarch/
Could not connect to https://repo.continuum.io/pkgs/free/win-64/
Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
...
Solving package specifications: .
Package plan for installation in environment C:\Program Files\Anaconda3:
The following packages will be downloaded:
package | build
---------------------------|-----------------
ipywidgets-0.0.1 | np19py34_0 7 KB
The following NEW packages will be INSTALLED:
ipywidgets: 0.0.1-np19py34_0
Proceed ([y]/n)? y
Fetching packages ...
Could not connect to https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1
-np19py34_0.tar.bz2
Error: Connection error: HTTPSConnectionPool(host='repo.continuum.io', port=443)
: Max retries exceeded with url: /pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.t
ar.bz2 (Caused by ProtocolError('Connection aborted.', gaierror(11004, 'getaddri
nfo failed'))):
https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.tar.bz2
This makes sense, since the box can't access the internet.
I downloaded the ipywidgets tarball from the listed URL at https://repo.continuum.io/pkgs/free/win-64/ipywidgets-0.0.1-np19py34_0.tar.bz2, and I ssh'ed it onto the box.
What command can I run on the box (it is a Windows 7 environment) so that it will run the install as local, looking at the downloaded tarball to unpack rather than trying to access the internet to get the file?
Download the whole package and its dependencies to some local directory
You can get it from PYPI ipywidgets
Let's consider you donwloaded from PYPI and you have ~/src/ipywidgets with ~/src/ipywidgets/setup.py which will have install_requires with a list of dep. in your /pypi directory. Like so:
install_requires=['hello', 'etc', ...]
To install your app and its dep. into the current python env., you've to do something like:
$ cd ~/src/ipywidgets
$ easy_install --always-unzip --allow-hosts=None --find-links=/pypi
Note that the build will fail if one or more dependencies are missing
If you want to use conda for this, might as well if you are already using anaconda, you should also be able to do:
conda install --offline PATH_TO_FILE/ipywidgets-0.0.1-np19py34_0.tar.bz2
Where, of course, PATH_TO_FILE is just the path to the file you've downloaded.

Categories