CertificateError when trying to install packages on a virtualenv - python

Hey I'm trying to install some packages from a requires file on a new virtual environment (2.7.4), but I keep running into the following error:
CertificateError: hostname 'pypi.python.org' doesn't match either of '*.addvocate.com', 'addvocate.com'
I cannot seem to find anything helpful on the error when I search. What is going wrong here? Who in the world is addvocate.com and what are they doing here?

The issue is being documented on the python status site at http://status.python.org/incidents/jj8d7xn41hr5

When I try to connect to pypi I get the following error:
pypi.python.org uses an invalid security certificate.
The certificate is only valid for the following names:
*.addvocate.com , addvocate.com
So either pypi is using the wrong ssl certificate or somehow my connection is being routed to the wrong server.
In the meantime I have resorted to downloading directly from source URLs. See http://www.pip-installer.org/en/latest/usage.html#pip-install

I had the same error, I fixed it by downgrading my pip version to 1.2.1:
easy_install pip==1.2.1

Changing your DNS settings should solve it for now.
For my Ubuntu 12.04 Amazon AWS Instance I did the following:
sudo pico /etc/dhcp/dhclient.conf
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
Save the file and it was fine after a few seconds.

Related

How to fix SSL certification error when downloading python 3.9.0 with pyenv on macOS Monterey?

sorry for any formatting errors. Am new to this. I am currently trying to get into the habit of using pyenv. I am not able to install 3.9.0 via '''pyenv install 3.9.0'''
I keep getting
BUILD FAILED (OS X 12.4 using python-build 20180424)
Results logged to /var/folders/q6/k3f34wm54ns_n2q_vx0n6xt80000gn/T/python-build.20220714193417.14118.log
Last 10 log lines:
/var/folders/q6/k3f34wm54ns_n2q_vx0n6xt80000gn/T/python-build.20220714193417.14118 ~
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
as the result.
What should I do to fix this?
If you are in a company network which intercepts traffic, get the public certificate and try setting this env variable first. export CURL_CA_BUNDLE="/usr/local/etc/openssl/cert.pem

I am getting this error The DNS operation timed out after 20.000144004821777 seconds when running my app in cygwin instead of my windows terminal

so I am trying to do some background job to run in my flask app , and in order to run the worker, I needed to use cygwin instead of my windows terminal. My application use MongoDb Atlas for documents storage and it works perfectly fine when I "flask run" it from my cmd . But I got the error once I run it or run the worker from cygwin. It is to note that I whitelisted my IP adress and installed the dnspython package , and still got the error.
Any suggestions about what could be the problem? I don't seem to find any answer in previous asked questions . Thank you.
It's because of your dynamic DNS configuration from your ISP. make it static or you can use googleDNS server which is 8.8.8.8 or 8.8.4.4 as your DNS servers.
I hit and resolved this same issue hit today w/ cygwin, python3.8, dnspython 1.16.0 by updating to dnspython 2.0.0 and ensuring there was a valid /etc/resolv.conf in place.

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.

SSL verification error in python

I am using the slackClient library to create a slack bot but I get ssl verification failed error when I use api.call() method of slack client. I was facing the same issue while using pip install but that got resolved by using --trusted-host. Is there some configuration in python required to access machine certs?
I have already imported the root cert into windows certificate manager and I am able to open the URL in browser securely without encountering message like "There is a problem with this website’s security certificate".
I do not want to disable the SSL verification
I referred to the answers given at
SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
but slack client library calls urllib3 internally and I am not able to specify ca-file for it.
Is there a way to resolve this issue and configure python to use machine certs directly?
The answer seems to be to downgrade websocket-client.
Try the following:
pip3 install websocket-client==0.47.0
Source: this comment on issue

Error when installing PyDev plugin for Eclipse

When trying to install PyDev on eclipse I get the following error message:
An error occurred while collecting items to be installed session context was: (profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http://pydev.org/updates/plugins/org.python.pydev_2.6.0.2012062818.jar.
Read timed out
Unable to read repository at http://pydev.org/updates/plugins/org.python.pydev.jython_2.6.0.2012062818.jar.
Read timed out
I don't know what that means, can someone elaborate please?
Thanks.
Just that Eclipse can't reach the site to fetch that JAR. You can check it manually by entering the name into the browser address bar:
http://pydev.org/updates/plugins/org.python.pydev_2.6.0.2012062818.jar
Possible causes:
server overload
DNS failure
company firewall refusing to download (had this happen to me)
connectivity problems

Categories

Resources