I am using Debian GNU/Linux 7.11 (wheezy), the default python is 2.7.3 and pip is 1.1 (which I have updated to 9.x). I installed python 3.6 to run some scripts, this error pops out,

Traceback (most recent call last):
  File "place_fixed2_debugged.py", line 2, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

so I tried pip install requests, and it shows it is already installed, then I tried to install request module manually, I downloaded requests-2.18.4 and run python3 setup.py, this error shows up,

File "setup.py", line 9, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

Then I triedapt-get install python3-setuptools it shows also installed python3-setuptools is already installed as well.

I think the problem here is, pip and apt are installing all python related packages under a path links to the default python2.7, both requests module and setuptool are not linked to python3.

I tried virtualenv, it requires zlib module, pip install zlib gives

root@localhost:~/Python-3.6.0# pip install zlib
Collecting zlib
/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/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.
/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: 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/security.html#insecureplatformwarning.
  Could not find a version that satisfies the requirement zlib (from versions: )
No matching distribution found for zlib

Is there any other more manageable ways to let me just link pip to python3.6? I don't really want to setup a virtualenv, thank you!

1 Answer 1


You need to run sudo apt install pip3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .