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

Python 3.12 raises InvalidPythonVersionError #148

Open
buddejul opened this issue Apr 19, 2024 · 4 comments
Open

Python 3.12 raises InvalidPythonVersionError #148

buddejul opened this issue Apr 19, 2024 · 4 comments

Comments

@buddejul
Copy link

I got the following error when trying to install a project with python_version set to 3.12 in the dialogue.

Traceback (most recent call last):
  File "C:\Users\budde\AppData\Local\Temp\tmp25i07k49.py", line 68, in <module>
    main()
  File "C:\Users\budde\AppData\Local\Temp\tmp25i07k49.py", line 64, in main
    raise InvalidPythonVersionError(python_version)
__main__.InvalidPythonVersionError:
ERROR: The python version must be >= 3.11, got 3.12.

ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
@hmgaudecker
Copy link
Member

Can you run pre-commit autoupdate and try again?

@buddejul
Copy link
Author

buddejul commented Apr 20, 2024

I am sorry, I don't follow: I am in my projects folder and use

cookiecutter https://github.com/OpenSourceEconomics/econ-project-templates/archive/v0.7.1.zip

Hence pre-commit autoupdate fails, since I am not in a git repo

(base) PS C:\Users\budde\projects> pre-commit autoupdate
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at C:\Users\budde\.cache\pre-commit\pre-commit.log

@hmgaudecker
Copy link
Member

Sorry, my bad! Thought it was a pre-commit error, but obviously not. I likely won't be able to take a look before Monday.

@buddejul
Copy link
Author

Not pressing from my side I am happy to run with the 3.11 option, just wanted to report since the message suggested it should technically be allowed.

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