3

I try to make an easy Python gui, therefore I need to import tkinter. This package is available in Python 3, so I need that interpreter, but I can't get it started in Pycharm. It always asks to install packaging tools and then I get the same error everytime and I can't seem to fix it. I get the following:

Executed command:

/tmp/tmpu8m14jqspycharm-management/pip-9.0.1/setup.py install

Error occured:

AttributeError: module 'setuptools.dist' has no attribute 'check_specifier'

Command output:

    Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2237, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: module 'setuptools.dist' has no attribute 'check_specifier'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/tmpu8m14jqspycharm-management/pip-9.0.1/setup.py", line 92, in <module>
    cmdclass={'test': PyTest},
  File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 272, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 327, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2239, in resolve
    raise ImportError(str(exc))
ImportError: module 'setuptools.dist' has no attribute 'check_specifier'

I already searched some fixes but none actually worked.

fangio
  • 1,746
  • 5
  • 28
  • 52
  • Possible duplicate of [ImportError: module 'setuptools.dist' has no 'check\_specifier' attribute](https://stackoverflow.com/questions/41141657/importerror-module-setuptools-dist-has-no-check-specifier-attribute) – Pike D. Nov 10 '17 at 15:40

2 Answers2

3

Python PIP might not be installed. In Debian based distribution:

sudo apt-get install python3-pip

should solve if you use Python 3.


For Python 2.7x

sudo apt-get install python-pip

Close PyCharm and re-open it.

user
  • 5,370
  • 8
  • 47
  • 75
Arthur Zennig
  • 2,058
  • 26
  • 20
-2

In this case, it may be possible that python pip (package installer) is not installed. So try installing that first.:

sudo apt-get install python3-pip