kritiksoman / GIMP-ML

AI for GNU Image Manipulation Program
https://github.com/kritiksoman/tmp/blob/master/GIMP-ML%20Presentation.pdf
MIT License
1.41k stars 133 forks source link

The "pip install enum" command fails. #35

Open bitshifter52 opened 3 years ago

bitshifter52 commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

The instruction in installGimpML.sh "python -m pip install enum" and the alternate instruction to use "pip install enum" found on https://github.com/kritiksoman/GIMP-ML/blob/master/INSTALLATION.md

See: "[5] Activate the environment and install torchvision, "opencv-python<=4.3", numpy, future, torch, scipy, typing, enum, pretrainedmodels, requests using pip."

The installation of enum fails.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

From the command line: pip install enum Here is the error message:

Collecting enum Using cached enum-0.4.7.tar.gz (20 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gyuvnxr4/enum/setup.py'"'"'; file='"'"'/tmp/pip-install-gyuvnxr4/enum/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-gyuvnxr4/enum/pip-egg-info cwd: /tmp/pip-install-gyuvnxr4/enum/ Complete output (33 lines): Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3/dist-packages/setuptools/init.py", line 5, in import distutils.core File "/usr/lib/python3.8/distutils/core.py", line 16, in from distutils.dist import Distribution File "/usr/lib/python3.8/distutils/dist.py", line 9, in import re File "/usr/lib/python3.8/re.py", line 145, in class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 62, in apport_excepthook if not enabled(): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled import re File "/usr/lib/python3.8/re.py", line 145, in class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute 'IntFlag'

Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 5, in <module>
    import distutils.core
  File "/usr/lib/python3.8/distutils/core.py", line 16, in <module>
    from distutils.dist import Distribution
  File "/usr/lib/python3.8/distutils/dist.py", line 9, in <module>
    import re
  File "/usr/lib/python3.8/re.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Ubuntu 20.04 GIMP: GNU Image Manipulation Program version 2.10.24 pip: pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

danielbulhosa commented 3 years ago

I'm having the same issue. Looks like it's been around for a while. Here's another issue on the same problem: https://github.com/kritiksoman/GIMP-ML/issues/17

joe-eis commented 3 years ago

You should use Python 2.7 and pip2. https://www.how2shout.com/linux/how-to-install-python-2-7-on-ubuntu-20-04-lts-linux

I still had a problem with the install script installGimpML.sh: My virtualenv did not have a --user -option, so I left it out.