Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'Events' from 'gooey' when running python3.8 examples/lifecycle_hooks.py #36

Open
abrichr opened this issue Sep 7, 2022 · 2 comments

Comments

@abrichr
Copy link

abrichr commented Sep 7, 2022

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:

  1. git clone https://github.com/chriskiehl/GooeyExamples.git
  2. cd GooeyExamples
  3. pip install -r requirements.txt
  4. python3.8 examples/lifecycle_hooks.py
  5. 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
@abrichr
Copy link
Author

abrichr commented Sep 7, 2022

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

@abrichr
Copy link
Author

abrichr commented Sep 7, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant