Ubuntu – ImportError: No module named pkg_resources

14.04pippkg-configpython3

I am trying to install tensorflow-gpu for python 3.
when I run pip3:

sudo -H apt-get pip3 install tensorflow-gpu

I get:

Traceback (most recent call last:)
 File "/usr/local/bin/pip3", line 5, in <module>
  from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Best Answer

pkg_resources is a dependency of setuptools. Open the terminal and type:

sudo apt install --reinstall python3-pkg-resources python3-setuptools
Related Question