Helen
Helen

Reputation: 533

How to fix "ModuleNotFoundError: No module named 'setuptools' "

I created a new project in PyCharm and in settings of the interpreter I saw message: 'python packaging tools not found'. When I clicked on "install packaging tools" got this error

Traceback (most recent call last):
  File "/tmp/tmp_mwyd_zhpycharm-management/pip-19.0.3/setup.py", line 6, in <module>
    from setuptools import find_packages, setup
ModuleNotFoundError: No module named 'setuptools'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/tmp/tmp_mwyd_zhpycharm-management/pip-19.0.3/setup.py", line 6, in <module>
    from setuptools import find_packages, setup
ModuleNotFoundError: No module named 'setuptools'

I tried: sudo apt-get update, sudo apt-get upgrade, sudo apt-get install python-setuptools nothing helped fix it.

Upvotes: 0

Views: 15899

Answers (1)

Benjamin Breton
Benjamin Breton

Reputation: 1547

setuptools is a Python package. You can install it with pip:

pip install setuptools

Upvotes: 2

Related Questions