Can't install tornado - python

I am setting up tensorflow and i got this output:
ERROR: matplotlib 1.3.1 requires nose, which is not installed.
so i am doing
sudo easy_install tornado
and i got as output:
earching for tornado
Reading https://pypi.python.org/simple/tornado/
Download error on https://pypi.python.org/simple/tornado/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'tornado' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for tornado
error: Could not find suitable distribution for Requirement.parse('tornado')
what should i do?
thanks
francesco
ERROR: matplotlib 1.3.1 requires nose, which is not installed.

It seems that you are running the command behind a proxy or a firewall. If this is the case, then you need to set the corresponding environment variables:
set http_proxy="username:password#host:port"
set https_proxy="username:password#host:port"
Otherwise, you can install tornado using pip by running (if you are not behind a proxy, then ignore --proxy):
pip --proxy http://user:password#proxy-host:port install tornado
EDIT: I would suggest to run
sudo -H pip install --ignore-installed matplotlib
in order to install the required packages and ignore the current version.

Related

MacOS 10.13 High Sierra "pip3 install" command doesn't work (SSLError)

for my job purposes, I need a MacOS, but there is no possibility to use a real mac. So I decided to set up virtual machine, using Virtualbox. After the machine was successfully setup, I've opened the Terminal app and run the following commands:
1)/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" (Homebrew install)
2)brew install python (Python 3 install)
3)pip3 install numpy
As an output of the last command, I got the next error message:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
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
Of course, I've tried to find a solution online. Reinstalling python or openssl via Homebrew didn't help. Linking openssl or installing other CA also didn't solve the problem. How can I actually fix this?
P.C. I also know that Apple is a sh*t company and tries to have minimum hardware and software of other companies. That's why they use LibreSSL instead of OpenSSL. But the last one is one that Python requests in order to have the ability to install packages via pip. After python was installed, the following message was in terminal:
This formula is keg-only, which means it was not symlinked into /usr/local.
If you need to have openssl#1.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.bash_profile
Running proposed command also doesn't solve the problem. Any thoughts?

SSL: TLSV1_ALERT_PROTOCOL_VERSION

I am very new to Python world, so please be patient with me.
I have a Mac running High Sierra (10.13.4). I installed Python on it and I now have two Python 2.7.10 and 3.6.5
As per my understanding 2.7.10 is default for Mac and I should not tinker with it.
Now, I am trying to connect Python3 to MySQL. I am running following command:
pip install MySQL-python
but facing an error
Collecting MySQL-python3
Could not fetch URL https://pypi.python.org/simple/mysql-python3/: 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 MySQL-python3 (from versions: )
No matching distribution found for MySQL-python3
I tried the solution provided here
ssl.SSLError: tlsv1 alert protocol version
openssl 1.0.2o_1
pip --version: pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)
I tried to install virtualenv by running following commend:
sudo pip install virtualenv
but still getting an error:
Could not fetch URL https://pypi.python.org/simple/virtualenv/: 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 virtualenv (from versions: )
No matching distribution found for virtualenv
Can someone please help me out here? I am trying to find answers my own but have failed so far, so need help.

I can not install the django-constance, with error of Could not find a version that satisfies the requirement django-constance (from versions: )

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.

Error while installing jupyter

I'm getting below error while installing Jupiter, does anyone came across similar issues.
pip3.5 install jupyter
Collecting jupyter
/grid/common/pkgs/python/v3.5.2/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
Could not fetch URL https://pypi.python.org/simple/jupyter/: 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 jupyter (from versions: )
No matching distribution found for jupyter
Here are the env details
OS: RHEL6
Python - 3.5.2
Pip: 9.0.1
Curl: 7.47.1
Openssl 1.0.1e
You can:
Go to Python root folder and run the "Install Certificates.command" file.
You may follow https://www.youtube.com/watch?v=BVS3U1OQzO4

python-request with OpenSSL on macOS Sierra

Hi allI met a problem when I tried to use python request package, you may find the error as follows:
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 512, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
Then I updated the openssl library to the latest version with brew in terminal.
>brew update
>brew install openssl
However while linking the latest openssl with
>brew link openssl -force
it came up error from macOS:
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
I'm not sure what to do in this case and there's barely no practical solution other than gaining root access which I just want to avoid.
Can anyone give me some hint? I really appreciate that.
BTW., my macOS version is Sierra 10.12.3.
I don't have ms dotnet installed on my mac. Please don't address that related answer.
Upgrading pyOpenSSL worked for me.
sudo pip install --upgrade pyOpenSSL
If you are prompted with the following warning:
Cannot uninstall 'pyOpenSSL'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You can do the ff:
sudo pip install --upgrade pyOpenSSL --ignore-installed pyOpenSSL

Categories