GooeyExamples
GooeyExamples copied to clipboard
`ImportError: cannot import name 'Events' from 'gooey'` when running `python3.8 examples/lifecycle_hooks.py`
Describe the bug
running python3.8 examples/lifecycle_hooks.py
generates an exception: `ImportError: cannot import name 'Events' from 'gooey'.
To Reproduce Steps to reproduce the behavior:
-
git clone https://github.com/chriskiehl/GooeyExamples.git
-
cd GooeyExamples
-
pip install -r requirements.txt
-
python3.8 examples/lifecycle_hooks.py
- Observe exception:
Traceback (most recent call last):
File "examples/lifecycle_hooks.py", line 4, in <module>
from gooey import Events, Gooey, GooeyParser
ImportError: cannot import name 'Events' from 'gooey' (/.../python3.8/site-packages/gooey/__init__.py)
Expected behavior Example runs without error
Desktop (please complete the following information):
- OS: MacOS 12.0.1
Attempting to upgrade gooey:
pip install gooey==1.2.0a0
Collecting gooey==1.2.0a0
Using cached Gooey-1.2.0a0-py2.py3-none-any.whl (766 kB)
Requirement already satisfied: Pillow>=4.3.0 in ./env/lib/python3.8/site-packages (from gooey==1.2.0a0) (9.2.0)
ERROR: Could not find a version that satisfies the requirement dataclasses>=0.8 (from gooey) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses>=0.8
Python 3.6 fails while installing wxpython:
python3.6 -m pip install -r requirements.txt
...
Command "/.../GooeyExamples/env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/35/pqjnmmwx24d2mtf4frt5dhcc0000gn/T/pip-install-0knweuch/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/35/pqjnmmwx24d2mtf4frt5dhcc0000gn/T/pip-record-w5xjelww/install-record.txt --single-version-externally-managed --compile --install-headers /.../GooeyExamples/env/include/site/python3.6/wxpython" failed with error code 1 in /private/var/folders/35/pqjnmmwx24d2mtf4frt5dhcc0000gn/T/pip-install-0knweuch/wxpython/
Python 3.10 fails at runtime:
python3.10 examples/lifecycle_hooks.py
...
Traceback (most recent call last):
File "/.../GooeyExamples/examples/lifecycle_hooks.py", line 4, in <module>
from gooey import Events, Gooey, GooeyParser
ImportError: cannot import name 'Events' from 'gooey' (/.../GooeyExamples/env/lib/python3.10/site-packages/gooey/__init__.py)
Attempting to upgrade to gooey 1.2:
pip install gooey==1.2.0a0
...
ERROR: Ignored the following versions that require a different python version: 0.7 Requires-Python >=3.6, <3.7; 0.8 Requires-Python >=3.6, <3.7
ERROR: Could not find a version that satisfies the requirement dataclasses>=0.8 (from gooey) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses>=0.8
How to run examples/lifecycle_hooks.py
?