I am trying to install pytorch on ubuntu 14.04, and i am using python 2.7.6/ cuda 8.0. But error comes out.
error 1:
torch-1.0.0-cp27-cp27m-linux_x86_64.whl is not a supported wheel on this platform.
error 2:
InsecurePlatformWarning
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)': /whl/cu80/torch-1.0.0-cp27-cp27mu-linux_x86_64.whl
/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:150: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu80/torch-1.0.0-cp27-cp27mu-linux_x86_64.whl (Caused by SSLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),))
I found that Insecureplatformwarning always appeared whenever i tried to install new modules. Is it possible to solve this problem without changing version of python or cuda? Since i am using tensorflow1.3.0 for python 2.7 and cuda 8.0, I am reluctant to change the version of python or cuda.
The first issue of the unsupported pytorch wheel is addressed in detail in the related posting specific to your case. Please try torch-1.0.1.post2-cp27-cp27mu-manylinux1_x86_64.whl (582.5 MB) downloadable via web browser from the Python Package Index website.
About the SSLError...sslv3 alert handshake failure, the error suggests that your operating system's OpenSSL library version<1.0.1 and Python version<2.7.9 do not support the newer TLS protocol version 1.2 that pip requires to connect to PyPI since about a year ago.
You can check the system OpenSSL library version with:
$ python -c "import ssl; print(ssl.OPENSSL_VERSION)" && openssl version
Even if the openssl library was up-to-date, another problem is that Python version 2.7.6 itself has ssl module that doesn't support PROTOCOL_TLSv1_2, which needs Python versions 2.7.9+ (or 3.4+) or later. In Ubuntu, the Python 2.7.9 version first appeared in Vivid Vervet (15.04) and Python 3.4 - since 14.10 (Utopic Unicorn), while current 18.04 LTS (Bionic Beaver) ships 2.7.14+ and 3.6.4+ respectively.
" > Is it possible to solve this problem without changing version of python or cuda? "
Fortunately, yes, to fix it you can install several Python wheels (packages) manually -- the detailed step-by-step guide is available here on Stackoverflow.
Specifically, the cryptography manylinux1 wheel contains the most recent statically-linked OpenSSL library that will re-enable pip (versions 10+) and will allow you to continue to use your good old Ubuntu linux with new Python programs.
Related
Following is the error message I am getting when running conda install pandas:
Collecting package metadata (current_repodata.json): failed
CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.
Exception: 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."))
Till yesterday, everything was fine. Than I had to install MU Editor and since than this problem occurred. I have no clue how to resolve it.
Can you please help.
I know uninstalling MU Editor and maybe reinstalling andaconda3 will resolve the issue. But that will not solve my problem. I need MU Editor too. I am using andaconda for pandas and for python I was using VS Code but the day I installed Anaconda3, that stopped working. So I had installed MU Editor.
When I execute the python program in the virtual environment of Anaconda, the console will report the following error.
D:\Anaconda\lib\site-packages\numpy\__init__.py:148: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
According to the tutorial of GitHub, I executed conda install -c intel mkl-service and I have installed mkl-service, but the problem is still not solved.
I searched the Internet for a long time, but no effective solution has been found. Please help or try to give some ideas on how to achieve this.Thanks in advance.
Due to employer's restrictions I couldn't use pip install nor the automatic installment in PyCharm on my office laptop. Both of this ways return error like:
SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')
Before few months I found a workaround - just to disable the VPN during the library's installation and that worked for a while, but after some time they pushed an Windows update which forbid this method too.
If I have Pandas library successfully installed on my laptop, is there any way how to export it to another machine (under the same installation restrictions)?
My Mac came installed with python 2.7 as the default python version. But, this version is no longer supported by many packages and software. I searched several online forums regarding how to change the default python version on mac. But, none of them seem to work. I also installed the latest version of python, and if I type:
python --version
It returns the version as python 3.8. But if I try to install packages like Biopython, I get an error like this -
defaulting to user installation because normal site-packages is not
writeable
Collecting biopython Using cached biopython-1.77.tar.gz (16.8 MB)
ERROR: Command errored out with exit status 1:
Biopython requires Python 3.6 or later. Python 2.7 detected
I am really finding it difficult to install many packages required for my work. Any help or suggestions would be greatly appreciated.
Thank you.
Probably, you just have to change your Python symbolic link.
Please check this, and you will get it: https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf
I am having difficulty running a piece of requests code in my IDE PyCharm. The code is very basic and will work on my system for every website except one. Here is the code I am running:
import requests
initialURL = 'http://www.acastipharma.com/'
r = requests.get(initialURL)
When I run this code I get an error message that terminates with
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.acastipharma.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)'),))
I first thought this was an SSL problem, but if I run the requests command with the verify=False switch I still get the same error. This leads me to believe that the problem is not an SSL problem. I tried running the same code from a different IDE and the error did not occur which led me to believe the problem lies with my IDE PyCharm. I tried using a different project interpreter in PyCharm and the error also did not occur. I realized that the two different PyCharm project interpreters used different versions of requests and every PyCharm project interpreter I use that has the most recent version of requests the code will work but if the PyCharm project interpreter uses an older version of requests the error appears. Unfortunately PyCharm for some reason will not allow me to update the requests module in the PyCharm project interpreter I am using. Here is the error message I get from PyCharm when I attempt to update requests:
Could not find a version that satisfies the requirement requests==2.19.1 (from versions: )
No matching distribution found for requests==2.19.1
PyCharm then suggests that I run the upgrade command from terminal:
pip install -U requests==2.19.1
Here is what PyCharm suggests:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'.
When I run this from terminal I get this:
Requirement already up-to-date: requests==2.19.1 in ./anaconda/lib/python3.5/site-packages (2.19.1)
It seems likely that the upgrade from terminal is occurring to the wrong directory, it is trying to update
./anaconda/lib/python3.5/site-packages
when I need it to update
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
Does anybody know how to specify the correct directory for the update when I run the pip install -U requests==2.19.1 command at terminal. Any assistance on how to get requests properly upgraded, whether from within PyCharm or at terminal, would be appreciated.
It turns out the problem was two-fold. The first problem was the version of OpenSSL that the project interpreter I was using was deprecated. I also had two versions of Python 3.5 on my system and whenever I would attempt to update a package (ie. OpenSSL) the version of python that was not used by my project interpreter would update rather than the version of Python 3.5 I was using for the project interpreter. I ended up installing Python 3.7 and creating a project interpreter based on Python 3.7. By having only one version of 3.7 on my system I was able to update the OpenSSL package specifically associated with 3.7 and the problem went away.