
Why we do this is a story for another article, where it’s explained in greater detail. Unbeknownst to many python programmers, you can actually import another python file into your python program. If this is the case, before rushing over to google this error, make sure that the library is installed at the Python installation you’re currently using. Now how is this relevant to this article? Well, if you have multiple python installations, there’s a good chance you’ve gotten confused between the two and are importing the library from the wrong place. As a result, it cannot access the libraries installed with the first Python installation.

The second Python installation of mine was done through the regular method, and is stored elsewhere. As a result only the python.exe in this folder can access those libraries. Now, every time I download a library, it’s installed in the above folder. My Python.exe file path looks something like this.Ĭ://Program Files/Microsoft Visual Studio/Python37 The first I happened to download when I was setting up Visual Studio, which would serve as my IDE for Python for a good while. As I’m writing this, I currently have two Python installations myself (accidentally of course).

I tried: sudo apt-get update, sudo apt-get upgrade, sudo apt-get install python-setuptools nothing helped fix it.One issue that can complicate things is if you have multiple Python installations on your computer.

ModuleNotFoundError: No module named 'apt_pkg'

ModuleNotFoundError: No module named 'setuptools'įile "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthookįrom apport.fileutils import likely_packaged, get_recent_crashesįile "/usr/lib/python3/dist-packages/apport/_init_.py", line 5, in įile "/usr/lib/python3/dist-packages/apport/report.py", line 30, in įile "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in įrom apport.packaging_impl import impl as packagingįile "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in įile "/usr/lib/python3/dist-packages/apt/_init_.py", line 23, in When I clicked on "install packaging tools" got this error Traceback (most recent call last):įile "/tmp/tmp_mwyd_zhpycharm-management/pip-19.0.3/setup.py", line 6, in įrom setuptools import find_packages, setup I created a new project in P圜harm and in settings of the interpreter I saw message: 'python packaging tools not found'.
