close

How to fix “module ‘platform’ has no attribute ‘linux_distribution'” when installing new packages with Python3.8?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to fix “module ‘platform’ has no attribute ‘linux_distribution'” when installing new packages with Python3.8 in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

How to fix “module ‘platform’ has no attribute ‘linux_distribution'” when installing new packages with Python3.8?

  1. How to fix “module 'platform' has no attribute 'linux_distribution'” when installing new packages with Python3.8?

    Python 3.8 removed some stuff. I solved my problems with pip (specifically pip install) by installing pip with curl

  2. fix “module 'platform' has no attribute 'linux_distribution'” when installing new packages with Python3.8

    Python 3.8 removed some stuff. I solved my problems with pip (specifically pip install) by installing pip with curl

Method 1

It looks like at least on my Ubuntu 16.04, pip is shared for all Python versions in /usr/lib/python3/dist-packages/pip.

This is what I did to get it working again:

  • sudo apt remove python3-pip
  • sudo python3.8 -m easy_install pip

You might want to install the python 3.5 version of pip again with sudo python3.5 -m easy_install pip.

Method 2

Python 3.8 removed some stuff. I solved my problems with pip (specifically pip install) by installing pip with curl

What worked for me was:
cd ~/Downloads
Downloading get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Then running it with python 3.8:
python3.8 get-pip.py

Solved it for me.

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read