ModuleNotFoundError: No module named 'distro'

14,443

Solution 1

pip3 install distro

This worked well for me. Solution by : @Ugo T.

Solution 2

For Debian/Ubuntu users, when you have the error:

command not found: pip3

you have to use apt:

apt install python3-distro
Share:
14,443

Related videos on Youtube

Shivam Kumar
Author by

Shivam Kumar

Updated on June 04, 2022

Comments

  • Shivam Kumar
    Shivam Kumar over 1 year

    I am trying to install a library (https://github.com/yuanming-hu/taichi/) . I am running a script for installation(install.py). I am using python version 3.6+

    I tried pip install distro. Still it's not working

    part of code(install.py) :

            import distro
            dist = distro.id() 
    

    Error message:

    File "install.py", line 184, in run
        import distro
    ModuleNotFoundError: No module named 'distro'
    
    • Ugo T.
      Ugo T. over 4 years
      How did you run the install.py file ? python3 install.py ?
    • Shivam Kumar
      Shivam Kumar over 4 years
      Yes I used python3 install.py
    • Ugo T.
      Ugo T. over 4 years
      Can you try to install distro again, but this time with pip3 install distro ?
    • Shivam Kumar
      Shivam Kumar over 4 years
      Yes It worked well!!!!