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

PushEstimator ImportError #162

Open
TheOnlyEmily opened this issue May 12, 2023 · 1 comment
Open

PushEstimator ImportError #162

TheOnlyEmily opened this issue May 12, 2023 · 1 comment

Comments

@TheOnlyEmily
Copy link

Attempting to import PushEstimator causes an import error. This is because the Sequence abstract type is not located in collections but instead it's in the the typing module.

TheOnlyEmily pushed a commit to TheOnlyEmily/pyshgp that referenced this issue May 12, 2023
@erp12
Copy link
Owner

erp12 commented May 23, 2023

Which version of Python are you using? Pyshgp is only tested against 3.7 and 3.8. I will update the README to reflect this.

I have some (slow) ongoing work to make pyshgp work on more recent versions of Python (hopefully without losing support for the currently supported versions) and it would be nice to keep that eventual goal in mind here. For example, the current documentation (for Python 3.9 to at least 3.11) says that typing.Sequence is deprecated in favor of collections.abc.Sequence.

We may need to import from a different module conditionally depending on the language version.

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

2 participants