Skip to content

Python 3.11 minimum #128

Description

@dogruis

#!/usr/bin/env python3

ImportError: cannot import name 'Self' from 'typing'
  (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py)
make[1]: *** [build/assets/hero.c1] Error 1
make: *** [cart] Error 2

cannot import name 'Self' —
The actual reason it's missing: PEP 673 added typing.Self in Python 3.11. It doesn't exist in 3.9 or 3.10. The 3.9 typing.py simply has no Self symbol.

#!/usr/bin/env python3.11

Quick fix would be to point to the minimum version in the shebang to python 3.11.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions