Problems with installation of Django Virtual Enviroment - python

I´m new in Python and Django and I'm trying to create a virtual enviroment for work with these two. I'm on Windows and when I try to create the virtual enviroments with the command
conda create --name myDjangoEnv django
this error shows up:
WARNING: A space was detected in your requested environment path
'C:\Users\Paul Miranda\AppData\Local\conda\conda\envs\myDjangoEnv'
Spaces in paths can sometimes be problematic.
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/pro/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/pro/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I have tried turning off the firewall and create it in the C:\ProgramData\Anaconda3 path because the possible issue with the spaces in the user name, but neither of the two works.
What can I do to solve this?

I solved this problem using the Anaconda Prompt application. In my case the commands doesn't work with the Windows CMD but they worked in the Anaconda Promt.

Related

local issuer certificate error uniquely in docker with python

Following error occurs only with docker app in python when making request to an https url.
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>
Outside of docker, the app works. I can fetch the same URL inside the docker image of other language app such as dotnet.
I have tried:
RUN update-ca-certificates
Install certfi library and manually supply the certificates during making the call
Manually insert the certificates that comes with certify library in different locations of docker images such as /usr/local/share/ca-certificates/, /etc/ssl/certs/ and RUN update-ca-certificates
Tried different versions (3.6.9, 3.8.4) and providers (alpine, buster, slim-buster ) of python.
Setting different env variables such as REQUESTS_CA_BUNDLE, SSL_CERT_FILE etc.
Use different libraries such as requests, urllib, urllib3
.... and really large number of different things.
It of course works when I turn the verify off, but I want to keep verification.
I was having this issue in an ARM Ubuntu 20.04 container.
I installed ca-certificates and curl, but I still couldn't use curl. For me the fix ended up being adding the following before calling curl:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

Cannot create a new environment or install libraries in Ananconda

I am trying to create a new environment from Anaconda navigator and from conda prompt. I cannot install python libraries as well. I get below error:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/r/noarch/repodata.json.bz2Elapsed: -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 filea 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(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))
I tried the solutions from the web, still no help
Try using a terminal and use the following command.
conda create -n testenv python=3.5
Let me know if you have any questions! The video below might help
https://youtu.be/pNqXHQUSEsc

CondaHTTPError: HTTP 000 CONNECTION FAILED for url - Anaconda

I have seen other post solving through ssl_verify making it false or adding the path of the certificate. I have done every one of them. I have installed and reinstalled several times the anaconda. I have disabled my antivirus program.
I have tried every option that I find online but nothing is working for me and I still get this error.
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("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
I'm not sure what I'm should be doing?
I strongly recommend to copy libcrypto-1_1-x64.* libssl-1_1-x64.* from .\Library in Anaconda folder to .\DLL in Anaconda folder. I'm 100% sure that your problem will be solved. Please don't crack your heads looking for solution on all the platforms.
Don't try editing .condarc file and face further issues. I am sure that problem will be solved after moving the above mentioned DLL files as directed.
I'm getting the same problem in Windows Subsystem for Linux (version 2) with "conda create -name sx python=3.7" the weird thing is "wget https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json" works fine, so I have no idea why conda is failing to fetch this file...
For me the issue gone after changing in c:\Users\user_xxx.condarc:
"ssl_verify: true" to "ssl_verify: false"
i had the same issue on win 10 and i resolved it by uninstalling the avast antivirus on my PC. I don't know if it's a good idea but i tried it and the issue was resolved.
in linux, conda config --set ssl_verify no resolves the issue.

Anaconda won't open and I'm getting CondaHTTPError: HTTP 000 error

I'm currently having problems with Anaconda on a mac. Every time I try to click on the icon to launch, it doesn't open. I looked online for some help and nothing has worked so far. I've tried to update conda via the terminal and I get this error:
Collecting package metadata: 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 have no idea what could have happened as I just used it yesterday and everything was working just fine.
If anyone has experienced this or has any idea on how to fix it, help would be very much appreciated!! Thank you for your time.
--UPDATE---
Surprisingly, if i go to anaconda2 folder and click on the icon, it opens, but when i go the anaconda3 folder (or the icon on my applications folder) it doesn't. Does anyone know the reason for this? Thanks!

Cannot create environment in anaconda, update conda , install packages

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.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
You are having issues with ssl. Some of these have entered in recent releases for us (using self signed keys) and so we have had to switch ssl_verification off in conda.
This wasn't enough though, and we also had to manually remove the REQUESTS_CA_BUNDLE environment variable that we were using to specify the path to the SSL certificate.
# Remove SSL
conda config --set ssl_verify false
See github issue here - https://github.com/ContinuumIO/anaconda-issues/issues/10340

Categories

Resources