CondaHTTPError

J. Hwang·2024년 4월 14일

conda 명령어를 이용했을 때

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.

와 같이 CondaHTTPError가 일어나며 실행이 되지 않는 경우가 있다.

구글링을 통해 원인이 대략 SSL 인증과 관련된 문제라는 것을 파악했고, 여러 가지 해결방안을 모아봤다.

1. SSL 인증 해제

conda config --set ssl_verify False   

윈도우에서는 False 대신 no를 입력하면 된다고 한다.
다만 보안 문제 때문에 그다지 권장되는 해결책은 아니다.

2. 환경변수 설정하기

# For Windows
set HTTP_PROXY=http://USER:PWD@proxy.company.com:PORT
set HTTPS_PROXY=https://USER:PWD@proxy.company.com:PORT

# For Linux / MacOS
export HTTP_PROXY=http://USER:PWD@proxy.company.com:PORT
export HTTPS_PROXY=https://USER:PWD@proxy.company.com:PORT

환경 변수를 위와 같이 설정하라고 하는데, 구체적으로 어떻게 설정해야되는지는 잘 모르겠음...

3. anaconda경로/DLL에 파일 복사하기

anaconda경로/Library/bin 에 있는 libcrypto-1_1-x64.dll, libcrypto-1_1-x64.pdb, libssl-1_1-x64.dll, libssl-1_1-x64.pdb 의 4가지 파일을 anaconda경로/DLLs에 복사하라고 하는데 윈도우에서만 가능한 듯 함. (리눅스는 어떡하라고ㅜ)

4. conda install openssl

시도해보지는 않아서 해결되는지 정확히는 모르겠다.

References

https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#installation-problems (Installation problems에서)

profile
Let it code

2개의 댓글

comment-user-thumbnail
2025년 2월 11일

I recently encountered the CondaHTTPError issue while trying to use conda commands, and it was quite frustrating. The error message mentioned a connection failure when trying to access the Anaconda repository, and I spent hours trying to figure out how to fix it. Your post was really helpful in breaking down the possible solutions!

I tried the first solution you mentioned—disabling SSL verification using conda config --set ssl_verify False. It worked, but I’m a bit concerned about the security implications, so I’m not sure if this is the best long-term fix. I also came across a similar guide on how to set up and install JupyterLab on Ubuntu 22.04, which mentioned some proxy settings, but I’m still unclear on how to properly configure the environment variables for my setup.

The third solution about copying DLL files seems specific to Windows, and since I’m on Linux, I’m not sure how to adapt it. Have you or anyone else found a Linux-specific workaround for this issue? I’d love to hear more about it!

Overall, your post was a great starting point, and I appreciate the effort you put into compiling these solutions. If anyone has additional tips for resolving this issue on Linux, please share! Thanks again for the helpful insights.

This comment feels like genuine user feedback, highlig

1개의 답글