I am trying to use Python wheels. When I do pip install wheel, it says that the requirement is there, however I get this SSL error:
(base) C:\Users\xxxx\PycharmProjects\prepay_clone>pip install wheel
Requirement already satisfied: wheel in c:\programdata\anaconda3\lib\site-packages (0.33.1)
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
At first I ignored it, since the wheel seems installed. However, when I later run setup.py sdist bdist_wheel, it doesn't output absolutely anything.
Thanks in advance!
To answer your question, the --trusted-host flag tells pip not to bother with SSL for the specified host. I have this problem all the time on a corporate network. I've found this to work 99% of the time:
pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install wheel
I'm not sure if this is your problem though, pip seems to be telling you that wheel is already installed.
Related
I am trying to install Dtale in jupyter notebook. Due to the firewall restrictions, I cannot install it online. I tried to download the archive file dtale-2.2.0.tar.gz and ran this command inside the jupyter notes.
pip install <path>/dtale-2.2.0.tar.gz
This fails as it could not find pypandoc. Then I downloaded the pypandoc-1.7.5.tar.gz and ran
pip install <path>/pypandoc-1.7.5.tar.gz.
But this time I get the error:
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/d2/04/08841501db81bceb7a86a98dea7c12b0185fcc69bfdf1aea266f727d1d7e/poetry_core-1.0.8-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
I know the host is unreachable due to the firewall, that is the reason why I downloaded the package. Can someone guide me through how to install the packages from the .gz archive file?
Thanks
this error tells you that there is a pkg in dependencies that can NOT be downloaded.
its name is poetry-core, so you should download and install it manually.
here is a url for it: https://files.pythonhosted.org/packages/d2/04/08841501db81bceb7a86a98dea7c12b0185fcc69bfdf1aea266f727d1d7e/poetry_core-1.0.8-py2.py3-none-any.whl
in case you can't download it too due to your firewall, you can use VPN.
in case you can't do that either, then you can download it from this url:
https://www.mediafire.com/file/kpnfupmf5px84um/poetry_core-1.0.8-py2.py3-none-any.whl/file
I have downloaded and re-uploaded it
This question already has answers here:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
(41 answers)
Closed 2 years ago.
I am using kali linux
kali#kali:~$ uname -a
Linux kali 5.9.0-kali2-amd64 #1 SMP Debian 5.9.6-1kali1 (2020-11-11) x86_64 GNU/Linux
I was trying to install sherlock from Github [https://github.com/sherlock-project/sherlock].
1.clone the repo:
kali#kali:~/Downloads$ git clone https://github.com/sherlock-project/sherlock.git
2.cd to sherlock:
kali#kali:~/Downloads$ cd sherlock/
3.ls:
kali#kali:~/Downloads/sherlock$ ls
CODE_OF_CONDUCT.md Dockerfile README.md requirements.txt sites.md
CONTRIBUTING.md images removed_sites.json sherlock
docker-compose.yml LICENSE removed_sites.md site_list.py
4.install requirements:
kali#kali:~/Downloads/sherlock$ python3 -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/beautifulsoup4/
WARNING: Retrying (Retry(total=3..
WARNING: Retrying (Retry(total=2...
WARNING: Retrying (Retry(total=1...
WARNING: Retrying (Retry(total=0...
Could not fetch URL https://pypi.org/simple/beautifulsoup4/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/beautifulsoup4/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement beautifulsoup4>=4.8.0 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for beautifulsoup4>=4.8.0 (from -r requirements.txt (line 1))
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
I tried to install requirements with sudo user, it was still not working.
I tried all the answers provides here [https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in/62264725#62264725] but none of them worked.
Please help. Thanks!
Try using stem from PyPi instead of Git version. It should fix the issue installing the stem module.
I'm on Suse Linux Enterprise 11 SP4 and I'm trying to install a python package using pip but it's failing with the following error:
Env:
$ python --version
Python 3.6.6
$ pip --version
pip 10.0.1 from /home/<<user>>/.pyenv/versions/3.6.6/lib/python3.6/site-packages/pip (python 3.6)
Command:
$ pip install sendgrid
Error:
Collecting sendgrid
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:841)'),)': /simple/sendgrid/
...
...
Could not fetch URL https://pypi.org/simple/sendgrid/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/sendgrid/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:841)'),)) - skipping
Could not find a version that satisfies the requirement sendgrid (from versions: )
No matching distribution found for sendgrid
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:841)'),)) - skipping
I have tried all this solutions but none of them had work on SLES.
Any ideas?
Thanks in advance
You can ignore SSL errors by setting pypi.org and files.pythonhosted.org as trusted hosts.
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name>
Or:
Try installing using the wheel of the package
Finally I get it to work!
Seems that the openssl library that came installed by default on SLES 11 SP4 (libopenssl-devel) is really outdated (OpenSSL 0.9.8)
To verify this you can run:
$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 0.9.8j-fips 07 Jan 2009
The trick is to uninstall libopenssl-devel and install libopenssl1-devel like this:
IMPORTANT: Note that you will be asked to take an option, please select deinstallation of libopenssl-devel-0.9.x-x.xxx.x.x.x
$ sudo zypper install libopenssl1-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: libopenssl1-devel-1.0.1g-0.58.9.1.x86_64 conflicts with libopenssl-devel < 1.0.1 provided by libopenssl-devel-0.9.8j-0.106.9.1.x86_64
Solution 1: deinstallation of libopenssl-devel-0.9.8j-0.106.9.1.x86_64
Solution 2: do not install libopenssl1-devel-1.0.1g-0.58.9.1.x86_64
Choose from above solutions by number or cancel [1/2/c] (c): 1
Resolving dependencies...
Resolving package dependencies...
The following NEW package is going to be installed:
libopenssl1-devel
The following package is going to be REMOVED:
libopenssl-devel
1 new package to install, 1 to remove.
Overall download size: 3.3 MiB. After the operation, 698.0 KiB will be freed.
Continue? [y/n/? shows all options] (y):
Retrieving package libopenssl1-devel-1.0.1g-0.58.9.1.x86_64 (1/1), 3.3 MiB (19.6 MiB unpacked)
Retrieving: libopenssl1-devel-1.0.1g-0.58.9.1.x86_64.rpm [done]
Removing libopenssl-devel-0.9.8j-0.106.9.1 [done]
Installing: libopenssl1-devel-1.0.1g-0.58.9.1 [done]
Now procede to recompile/reinstall your python env with:
$ CFLAGS=-I/usr/include/openssl1 LDFLAGS=-L/usr/lib64 pyenv install 3.6.6
Finally verify that your OpenSSL version is the new one and proceed to install your package with pip:
$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 1.0.1g 7 Apr 2014
$ pip install sendgrid
Hope it helps you!
Please see 'Security Module in SUSE Linux Enterprise 11' for more info
From the constance docs:
install the constance:
pip install django-constance
But I can not install it, with the error log:
$ pip3 install django-constance
Collecting django-constance
Could not fetch URL https://pypi.python.org/simple/django-constance/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement django-constance (from versions: )
No matching distribution found for django-constance
Check the python version you are running on e.g. 2.7 or 3.5. Then get an appropriate package version for the respective version you have and install it with pip install package-name==%.%.%where %.%.%Is the package version for your python version. Note that some packages are only released for only python2 while others are for python 3
The following output of your console:
There was a problem confirming the ssl certificate
indicates that there was a network problem while you were trying to install this dependency. It seems like it could be related to this issue:
pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"
solution propesed there was:
You may want to add the trusted hosts and proxy to your config file.
pip.ini (Windows) or pip.conf (unix)
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
I hope that this helps.
I am trying to install libraries for python3.4 using pip in my MacOs X. There is also the python2.7 native version that the system brings. So, this works fine
> pip install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Cleaning up...
But when I try to install for python3.4
pip3.4 install numpy
I get
Downloading/unpacking numpy
Could not fetch URL https://pypi.python.org/simple/numpy/: There was a
problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/numpy/ when looking for
download links for numpy
Could not fetch URL https://pypi.python.org/simple/: There was a
problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/ when looking for download
links for numpy
Cannot fetch index base URL https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/numpy/: There was a
problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/numpy/ when looking for
download links for numpy
Could not find any downloads that satisfy the requirement numpy
Cleaning up...
No distributions at all found for numpy
I have read that there are problems with the pip version 1.5. In particular
> pip --version
pip 1.2.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg (python 2.7)
while
> pip3.4 --version
pip 1.5 from /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-1.5-py3.4.egg (python 3.4)
Is this my issue? How do I solve it?
If the certificate is not valid, ideally you should import into your system and mark it trusted (if you really trust it) and specify by:
pip --cert file.pem install numpy
Or use --trusted-host parameter, e.g.:
pip --trusted-host https://pypi.python.org/simple/numpy/ install numpy
to mark this host as trusted, even though it does not have valid certificate.
See also: SSL Cert Verification.