Im trying to install Python packages enum and Treedict with Pip. Python is v. 3.7.3 and Pip is v. 19.1.1. Im using PyCharm as my IDE.

I got following error messages:

ERROR: Complete output from command python setup.py egg_info:

File "<string>", line 1, in <module>
File "...\pycharm-packaging\treedict\setup.py", 
line 96
    print "+++++++++++++++++++"
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("+++++++++++++++++++")?


Collecting enum
Using cached https://files.pythonhosted.org/packages/02/a0/32e1d5a21b703f600183e205aafc6773577e16429af5ad3c3f9b956b07ca/enum-0.4.7.tar.gz

ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "...\Python\Python37\lib\site-packages\setuptools\__init__.py", line 6, in <module>
    import distutils.core
  File "...\Python\Python37\lib\distutils\core.py", line 16, in <module>
    from distutils.dist import Distribution
  File "...\Python\Python37\lib\distutils\dist.py", line 9, in <module>
    import re
  File "...\Python\Python37\lib\re.py", line 143, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag

ERROR: Command "python setup.py egg_info" failed with error code 1 in ...\pip-install-lke25k9k\treedict\

Some packages, such as numpy and cython installed succesfully but these somehow, do not. Any help appreciated. Thanks.

  • What actual command were you running? Seems that python is a 2.7 version and not 3.7. – slhck Jun 17 '19 at 6:49
  • python -m pip install treedict. Python should point to a version 3.7 if not mistaken. python -V returns Python 3.7.3. But I also have v. 2.7 on my pc. – Yulia23576 Jun 17 '19 at 7:11

TreeDict's last release was in 2013. It's not compatible with Python 3 and therefore cannot be installed. (The errors show that it's using invalid print syntax, for example.)

You probably also don't need to install enum. There is a Q&A at Stack Overflow related to this issue. The solution seems to be to either uninstall the enum34 package – if installed – or make sure that nothing else is overriding your PYTHONPATH environment variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.