Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.6 No module named pip

I have just installed Python 3.6 on Fedora 25 (64 bits) by running dnf install python36 and I can't use any modules Python 3.5 can otherwise use just fine, for example, PyCharm complains about setup tools not being installed, also I can run python3 and issue:

import aiohttp 

However, if run python36 and then:

import aiohttp 

I instead get:

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'aiohttp'

Pip is also not present on python36, as python36 -m pip throws:

/usr/bin/python36: No module named pip

I have to note that I've got python 3.4, 3.5 and 3.6 installed at the same time, both 3.4 and 3.5 working just fine

like image 530
arielnmz Avatar asked Jun 19 '17 04:06

arielnmz


People also ask

How do I fix No module named pip?

Solution Idea 1: Install Library pip You need to install it first! Before being able to import the Pandas module, you need to install it using Python's package manager pip . Make sure pip is installed on your machine. This simple command installs pip in your virtual environment on Windows, Linux, and MacOS.

How do I fix No module named pip windows?

The Python "ModuleNotFoundError: No module named 'pip'" occurs when pip is not installed in our Python environment. To solve the error, install the module by running the python -m ensurepip --upgrade command on Linux or MacOS or py -m ensurepip --upgrade on Windows.

How do I fix usr bin python3 No module named pip?

While this error can come due to multiple reasons but in most of the cases you will see this error because of pip package not installed in your System. So to solve this kind of error, you need to simply install pip package from the default Repo.

How do I get-pip in Python?

Ensure you can run pip from the command lineRun python get-pip.py . 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they're not installed already. Be cautious if you're using a Python install that's managed by your operating system or another package manager.


1 Answers

On Fedora 25 Python 3.6 comes as a minimalistic version without pip and without additional dnf installable modules.

But you can manually install pip:

wget https://bootstrap.pypa.io/get-pip.py sudo python3.6 get-pip.py 

After that you can use it as python3.6 -m pip or just pip3.6.

like image 68
Klaus D. Avatar answered Oct 04 '22 00:10

Klaus D.