Pip having problems installing Gooey

Hi. I’ve been trying to install Gooey to run a creality-dwin-lcd-customizer for my 3D Printer, and every time I try to install Gooey via Command Prompt it says the following:


C:\Users\anonymous user>pip install Gooey
Defaulting to user installation because normal site-packages is not writeable
Collecting Gooey
  Using cached Gooey-1.0.8.1-py2.py3-none-any.whl (680 kB)
Collecting pygtrie>=2.3.3
  Using cached pygtrie-2.5.0-py3-none-any.whl (25 kB)
Collecting wxpython>=4.1.0
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Anonymous User\AppData\Local\Temp\pip-install-7qhzvp5s\wxpython_f2a4337f82314ea58ad93ad8ce455f6c\setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "C:\Users\Anonymous User\AppData\Local\Temp\pip-install-7qhzvp5s\wxpython_f2a4337f82314ea58ad93ad8ce455f6c\buildtools\config.py", line 30, in <module>
          from attrdict import AttrDict
      ModuleNotFoundError: No module named 'attrdict'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Please help soon!!

“Just use pip,” they say. “Installing with pip is a breeze.”

My absolute wild guess is that you need to install attrdict before you can install Gooey. Try pip install attrdict first.

wxPython-Phoenix has provided prebuilt wheels for MacOS and Windows 64bit, but not for others. And there is no clear guide on how to build from the source.

You have to attempt-and-fail step by step, installing attrdict would be a good start, but remember to add --no-build-isolation when running pip install.

Successfully installed attrdict, but now it shows this error:

C:\Users\anonymous user>pip install Gooey --no-build-isolation
Defaulting to user installation because normal site-packages is not writeable
Collecting Gooey
  Using cached Gooey-1.0.8.1-py2.py3-none-any.whl (680 kB)
Requirement already satisfied: Pillow>=4.3.0 in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from Gooey) (9.3.0)
Requirement already satisfied: psutil>=5.4.2 in c:\users\Anonymous\appdata\roaming\python\python311\site-packages (from Gooey) (5.9.4)
Requirement already satisfied: colored>=1.3.93 in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from Gooey) (1.4.4)
Collecting pygtrie>=2.3.3
  Using cached pygtrie-2.5.0-py3-none-any.whl (25 kB)
Collecting wxpython>=4.1.0
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\anche\AppData\Local\Temp\pip-install-he8talii\wxpython_4992b4f2b25a42d885f2a6d1de88f134\setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "C:\Users\Anonymous User\AppData\Local\Temp\pip-install-he8talii\wxpython_4992b4f2b25a42d885f2a6d1de88f134\buildtools\config.py", line 30, in <module>
          from attrdict import AttrDict
        File "C:\Users\Anonymous User\AppData\Roaming\Python\Python311\site-packages\attrdict\__init__.py", line 5, in <module>
          from attrdict.mapping import AttrMap
        File "C:\Users\Anonymous User\AppData\Roaming\Python\Python311\site-packages\attrdict\mapping.py", line 4, in <module>
          from collections import Mapping
      ImportError: cannot import name 'Mapping' from 'collections' (C:\Program Files\Python311\Lib\collections\__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Was I supposed to install attrdict alone with --no-build-isolation, Gooey with --no-build-isolation, or both with --no-build-isolation? Currently I installed both attrdict AND Gooey with --no-build-isolation, but I’ll fiddle around and see which combination works.
Just in case you need the info from the installation of attrdict, here it is:

C:\Users\Anonymous User>pip install attrdict --no-build-isolation
Defaulting to user installation because normal site-packages is not writeable
Collecting attrdict
  Using cached attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
Requirement already satisfied: six in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from attrdict) (1.16.0)
Installing collected packages: attrdict
Successfully installed attrdict-2.0.1

Hang on, I read the code, and it can’t find that package, which is why it’s giving me that error!!
Installing the packages now and will see if it resolves.

UPDATE: Well, I’ve installed attrdict, cmake, mapping, etc. and I still can’t get it to work. On top of that, I don’t know what, why, when, or where this new error message is or means.

C:\Users\Anonymous User>pip install Gooey
Defaulting to user installation because normal site-packages is not writeable
Collecting Gooey
  Using cached Gooey-1.0.8.1-py2.py3-none-any.whl (680 kB)
Requirement already satisfied: Pillow>=4.3.0 in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from Gooey) (9.3.0)
Requirement already satisfied: psutil>=5.4.2 in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from Gooey) (5.9.4)
Requirement already satisfied: colored>=1.3.93 in c:\users\Anonymous User\appdata\roaming\python\python311\site-packages (from Gooey) (1.4.4)
Collecting pygtrie>=2.3.3
  Using cached pygtrie-2.5.0-py3-none-any.whl (25 kB)
Collecting wxpython>=4.1.0
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Anonymous User\AppData\Local\Temp\pip-install-n4srccgw\wxpython_85533b686d38405580fc364c9b666e75\setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "C:\Users\Anonymous User\AppData\Local\Temp\pip-install-n4srccgw\wxpython_85533b686d38405580fc364c9b666e75\buildtools\config.py", line 30, in <module>
          from attrdict import AttrDict
        File "C:\Users\Anonymous User\AppData\Roaming\Python\Python311\site-packages\attrdict\__init__.py", line 5, in <module>
          from attrdict.mapping import AttrMap
        File "C:\Users\Anonymous User\AppData\Roaming\Python\Python311\site-packages\attrdict\mapping.py", line 8, in <module>
          from attrdict.mixins import MutableAttr
        File "C:\Users\Anonymous User\AppData\Roaming\Python\Python311\site-packages\attrdict\mixins.py", line 17, in <module>
          class Attr(Mapping):
      TypeError: module() takes at most 2 arguments (3 given)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I’m going to give up soon and switch to C++, as this is WAY too much work, especially for a “High-Level” programming language.

Okay, the problem is actually from collections import Mapping - for a while this was available from the base collections package, but it’s actually supposed to be imported from collections.abc. In Python 3.10, the old names were removed breaking this package. Looking at the attrdict repo, it’s been abandoned by the author for a while, so wxPython should probably have migrated away from it. Ah, you can pip install attrdict3, which is a fork of the project that works on 3.10+.

Ok, so I installed attrdict3, and requests, and it successfully installed Gooey!! Thank you sooo much!!