Not able to update conda environment - python

I am getting following error while updating conda environment.
command:
conda update setuptools
Conda not able to download pywavelets-1.1.1.
getting below error:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/pywavelets-1.1.1-py37he774522_0.tar.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.
Other packages are getting downloaded properly

Issue resolved with following steps:
1. reinstalled Anaconda
2. create condarc file with following content in it.
proxy_servers:
http: http://username:password#proxy:8080
https: https://username:password#proxy:8080
ssl_verify: false
channels:
- defaults
report_errors: false

Related

Cannot install Pip in manjaro(Arch-Linux) , error while retriving files

I tried installing pip in manjaro(Arch-Linux) from terminal.
I tried running the following command -
sudo pacman -S python-pip
it gave me the following error -
Error Screenshot
python-pip-22.3-1-any.pkg.tar.zst failed to download
Total (1/7) 3.9 MiB 80.0 KiB/s 00:50 [#######################################################################################] 100%
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL connection timeout
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from mirror.csclub.uwaterloo.ca : The requested URL returned error: 404
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from mirror.tarnkappe.info : The requested URL returned error: 404
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from mirrors.ucr.ac.cr : SSL connection timeout
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from manjaro.ipacct.com : The requested URL returned error: 404
error: failed retrieving file 'python-pip-22.3-1-any.pkg.tar.zst' from mirror.alpix.eu : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.
can anyone tell me how to fix this issue? and why pip wasn't packaged with python in the first place ?
TLDR: just run pacman -Syu python-pip instead of pacman -S python-pip
As Arch Linux(and Manjaro) are rolling release it is not recommended to do do partial updates as they can break packages or in this case after some time the pacman database can be outdated so you should always do an update in order to prevent any issues when installing/updating packages, unless you know explicitly that you do not want to do a partial update you should not do it.
as for the 404 error it is pretty common that the mirrors of the packages delete the old packages for those reasons.
in the case for pip is unknow to me but it should be that python and pip are not the same and should be treated as such

Why does conda look for a package in a channel not listed in the .condarc file?

I am struggling to install packages on Win10 computer where I have no admin privileges and I have restricted access to the Internet throughout our corporate infrastructure. I have Python 3.6 with couple of other packages installed and I'd like clone the environment to do some experiments. As I must install packages only from the repository of the corporate, I have added the following line to the condarc file placed in my %userprofile% directory:
ssl_verify: false
channels:
- https://uname:password#corporateURL/repository/type
Now if I try to clone the base environment with conda create --clone base --name exp_env, it gets all the packages except one, downloading and extracting packages shows 0% at that packege, and tells me that
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/pckname-version-pyversion.tar.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.
However, I am able to download that package with my browser from the Internet and from the repository fo the corporate too.
Why does conda look for that package outside the channel I gave to it in the .condarc file?
Why cannot conda download that package even I can download it with my browser?
How to solve the problem by
telling conda to use the repository of the corporate
Downloading the package manually and feed conda with that file?
Additional info
I masked out some of the irrelevant info, but these are the things conda tells:
(base) %userprofile%>conda info
active environment : base
active env location : %ProgramFiles%\Anaconda3
shell level : 1
user config file : %userprofile%\.condarc
populated config files : %userprofile%\.condarc
conda version : X
conda-build version : T
python version : Z.final.0
base environment : %ProgramFiles%\Anaconda3 (read only)
channel URLs : https://user:password#corporateURL/repository/type/win-64
https://user:password#corporateURL/repository/type/noarch
https://user:password#www.corporateURL/repository/type2/win-64
https://user:password#www.corporateURL/repository/type2/noarch
https://user:password#corporateURL/repository/type3/win-64
https://user:password#corporateURL/repository/type3/noarch
package cache : %ProgramFiles%\Anaconda3\pkgs
%userprofile%\AppData\Local\conda\conda\pkgs
envs directories : %userprofile%\AppData\Local\conda\conda\envs
%ProgramFiles%\Anaconda3\envs
%userprofile%\.conda\envs
platform : win-64
user-agent : conda/X requests/Y CPython/Z Windows/10 Windows/S
administrator : False
netrc file : None
offline mode : False

Set up anaconda interpreter in PyCharm on Windows

I have anaconda 3 and tensorflow set up and they work well from the anaconda command line. I would like to use PyCharm but cannot add the interpreter Conda.
I followed the instructions from:
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html
I tried different things. The first is where the conda executable is anaconda.exe:
C:\Logiciels\Anaconda3\Scripts\anaconda.exe create -p C:\Logiciels\Anaconda3\envs\Ex_Files_TensorFlow -y python=3.7
I obtain the error:
anaconda: error: argument : invalid choice: 'create' (choose from 'auth', 'label', 'channel', 'config', 'copy', 'download', 'groups', 'login', 'logout', 'move', 'notebook', 'package', 'remove', 'search', 'show', 'upload', 'whoami')
I tried the conda.exe as executable:
C:\Logiciels\Anaconda3\Scripts\conda.exe create -p C:\Logiciels\Anaconda3\envs\Ex_Files_TensorFlow -y python=3.5
But obtain the output:
Collecting package metadata: ...working... failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/noarch/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/r/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I also tried:
C:\Logiciels\Anaconda3\python.exe create -p C:\Users\hel\.conda\envs\Ex_Files_TensorFlow -y python=3.7
The command output is then:
C:\Logiciels\Anaconda3\python.exe: can't open file 'create': [Errno 2] No such file or directory
But the file exists and is there. Why PyCharm doesn't see it?
I also tried version 3.5 instead of 3.7 and a different folder to set the environment in. Do you have any suggestions?
As suggested in the comments, I looked for existing environement in the conda prompt with the command:
conda info --envs
that returns environement presents on the machine
And copy the path to the interpreter field in Add Interpreter > Conda > Existing Environment > Interpreter
I found my conda.exe buried in folder
C:\Users\MYUSER\AppData\Local\Continuum\anaconda3\Scripts

conda : SSLError(SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),),) conda

I want to use miniconda3 to install a package but it pops that error:
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/noarch/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(SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),),)
BTW, the miniconda2 runs wells only miniconda3 has the problem.
PS. I also tried to use wget --no-check-certificate to download the file and got the error too:
wget https://repo.anaconda.com/pkgs/main/linux-64/repodata.json.bz2
--2019-03-14 02:03:44-- https://repo.anaconda.com/pkgs/main/linux-64/repodata.json.bz2
Resolving repo.anaconda.com (repo.anaconda.com)... 104.16.130.3,
104.16.131.3, 2606:4700::6810:8303, ...
Connecting to repo.anaconda.com (repo.anaconda.com)|104.16.130.3|:443... connected.
Unable to establish SSL connection.
The system is CentOS and I have already use sudo yum update to update the sys file and library.

Why do I get the following error when using 'conda update --all' and how do I fix it?

I'm running conda 4.3.18 on win-64 with python 3.6.0. Until recently I've been running separate virtual environments successfully using conda and had no problems. Today I can't update anything in any environment. I get the following error when using conda update --all for example:
Fetching package metadata ...........ERROR requests.packages.urllib3.connection:
_match_hostname(360): Certificate did not match expected hostname: conda.binstar
.org. Certificate: {'subject': ((('commonName', 'anaconda.com'),),), 'subjectAlt
Name': [('DNS', 'anaconda.com'), ('DNS', 'anacondacloud.com'), ('DNS', 'anaconda
cloud.org'), ('DNS', 'binstar.org'), ('DNS', 'wakari.io')]}
CondaHTTPError: HTTP None None for url <https://conda.binstar.org/menpo/win-64/r
epodata.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(CertificateError("hostname 'conda.binstar.org' doesn't match e
ither of 'anaconda.com', 'anacondacloud.com', 'anacondacloud.org', 'binstar.org'
, 'wakari.io'",),),)
I'm somewhat new to conda and it is unclear to me how I should fix this problem.
Try temporarily disabling the check:
CONDA_SSL_VERIFY=false conda update --all
Ref: https://github.com/conda/conda/issues/5170
On Windows try running
conda config --set ssl_verify false
conda update --all

Categories

Resources