53

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

3 Answers 3

100

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.

9
  • Ty for the suggestion, by the way is there a link to a source with more info? I'd like to know any other problems I may run into with 3.6.
    – arielnmz
    Jun 19, 2017 at 5:05
  • It''s for developers. See dnf info python36 for details.
    – Klaus D.
    Jun 19, 2017 at 5:12
  • You are right, I actually managed to install the full stack by compiling 3.6 form source code, not the best solution IMO but it just works, though my python3 command has been replaced for python3.6 instead of 3.5, I'll have to work around that issue.
    – arielnmz
    Jun 19, 2017 at 14:17
  • After much search, this is what worked on my mac, where I had the same problem, when trying to install pybind11. The python binary used in my case was in /opt/local/bin/python3.6, Dec 9, 2017 at 8:05
  • 5
    on a fresh machine, you may get No module named 'distutils.util'. Be sure to first run sudo apt-get install python3-distutils before installing pip.
    – hughes
    Jan 7, 2020 at 15:56
42

In Debian distributions, you can run

sudo apt-get install python-pip ##for python2

sudo apt-get install python3-pip ##for python3
0
3
sudo dnf install python3

Try this.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.