Installed Python3.7 from package, trying to run pip3.7 does not work - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Installed Python3.7 from package, trying to run pip3.7 does not work (/thread-20199.html) |
Installed Python3.7 from package, trying to run pip3.7 does not work - JBristow1729 - Jul-31-2019 Hi all. I am working on an ubuntu 16.04 VM and have installed python3.7 from a package. I now have the following outputs when checking versions: $ python --version Python 2.7.12 $ python3 --version Python 3.5.2 $ python3.7 --version Python 3.7.4 Now I am trying to install packages using 'pip' - specifically the 'slackclient' package. I have successfully installed it using pip and pip3, but these packages doesn't correspond with python3.7, so trying pip3.7 gives me the following error: $ pip3.7 install --user slackclient pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting slackclient 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/slackclient/ Retrying (Retry(total=3, 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/slackclient/ Retrying (Retry(total=2, 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/slackclient/ Retrying (Retry(total=1, 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/slackclient/ Retrying (Retry(total=0, 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/slackclient/ Could not fetch URL https://pypi.org/simple/slackclient/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/slackclient/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping Could not find a version that satisfies the requirement slackclient (from versions: ) No matching distribution found for slackclient 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 even tried running: $ python3.7 -m pip install --user slackclient to the save effect. What might be causing this and how do I resolve it? RE: Installed Python3.7 from package, trying to run pip3.7 does not work - Larz60+ - Aug-01-2019 what does pip -V show? and pip3 -V RE: Installed Python3.7 from package, trying to run pip3.7 does not work - JBristow1729 - Aug-01-2019 $ pip -V pip 19.2.1 from /home/<user>/.local/lib/python3.5/site-packages/pip (python 3.5) $ pip3 -V pip 19.2.1 from /home/<user>/.local/lib/python3.5/site-packages/pip (python 3.5) $ pip3.7 -V pip 19.0.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7) RE: Installed Python3.7 from package, trying to run pip3.7 does not work - metulburr - Aug-01-2019 What method did you use to install python3.7? Are you using some sort of proxy at all? Check your network, firewalls, proxies, and so on. You could also try upgrading you pip as it is older than the other two as it is 19.0.3 while the others are 19.2.1 sudo pip3.7 install --upgrade pip RE: Installed Python3.7 from package, trying to run pip3.7 does not work - michaellossagk - Aug-11-2019 I have a video on how to install Python on YouTube[1]. I also have a blog post[2] on my website. The basic steps are sudo apt-get update Now that the package lists have been updated we can upgrade to the latest versions with the apt-get upgrade command: sudo apt-get -y upgrade Once the packages have been upgraded, we can install Python 3.7. This is done with the apt-get install command: sudo apt-get install -y python3.7 Once the installation is complete, we confirm that it was successful by calling Python 3.7 and printing out the version number: python3.7 -V # expected output Python 3.7.3 Now we have successfully completed the installation of Python. Since we want to work with other Python packages in the future, we can now install the package management program PIP. For this we execute the following command: sudo apt-get install -y python3-pip In the following, we make sure that Python 3.7 is the latest python3 version. To achieve that we set a symbolic link to python3. sudo ln -sf /usr/bin/python3.7 /usr/bin/python3 Once PIP has been installed we have to update PIP. Unfortunately we have to do this manually although we have just installed PIP, cause the installed version is pretty old, so yes, this step is necessary: python3 -m pip install --upgrade pip Once the installation is complete we also confirm this by calling the version number of PIP: python3 -m pip -V # expected output pip 19.2.1 from /home/vagrant/.local/lib/python3.7/site-packages/pip (python 3.7) Now we are still testing if we can actually install libraries with PIP. For this we use a very popular Python math library named numpy python3 -m pip install numpy [1]: https://youtu.be/PKUrhVqEpxE [2]: https://techdiffuse.com/en/2019/08/06/python-how-to-install/ |