Ubuntu 20.04: No module named 'distro'
See original GitHub issueOn a fresh ubuntu 20.04 install the run.py fails with missing module distro. You should install python3-distro first:
apt install python3-distro
Impacted versions
- Distribution: Ubuntu
- Codename: Focal
Steps to reproduce
fresh install, than run:
python3 run.py --stop-after-configfile-check domain.hu
Full trace using --debug option or current behaviour
Traceback (most recent call last):
File "/usr/src/modoboa-installer/modoboa_installer/utils.py", line 80, in dist_info
import distro
ModuleNotFoundError: No module named 'distro'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 13, in <module>
from modoboa_installer import package
File "/usr/src/modoboa-installer/modoboa_installer/package.py", line 105, in <module>
backend = get_backend()
File "/usr/src/modoboa-installer/modoboa_installer/package.py", line 93, in get_backend
distname = utils.dist_name()
File "/usr/src/modoboa-installer/modoboa_installer/utils.py", line 94, in dist_name
name, version, _id = dist_info()
File "/usr/src/modoboa-installer/modoboa_installer/utils.py", line 85, in dist_info
return platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
Expected behavior
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named 'distro'
For Debian/Ubuntu users, when you have the error: command not found: pip3. you have to use apt : apt install python3-distro.
Read more >how to solve "No module named 'distro_info'" on updating
sudo apt-get install --reinstall python3-distro-info worked for me.
Read more >ModuleNotFoundError: No module named 'distro-tutorial'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'distro-tutorial' How to remove the Mo.
Read more >A brand new website interface for an even better experience!
Ubuntu 20.04 : No module named 'distro'
Read more >Solved: ModuleNotFoundError: No module named 'skbuild'
Please note that in my case I am using Ubuntu 20.04 LTS System with Python3 installed. This could be different for you. You...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello
On new install of ubuntu server 20.04 everything works as expected. I checked and python3-distro is present at install
What was the setting you use for ubuntu install ?
this issue should be fixed now.