How can I resolve Python version conflicts when installing poetry when getting started with the PyPanther starter kit?
Last updated: June 17, 2025
Issue
When attempting install poetry during pypanther-starter-kit setup, I encountered Python version compatibility errors, particularly when the system is running a different Python version than the required 3.11.*:
The currently activated Python version 3.12.4 is not supported by the project (3.11.*).
Trying to find and use a compatible version.
Poetry was unable to find a compatible version.Resolution
To resolve this issue, follow the steps below, which also align with the prerequisites in the project's README:
Ensure you have Poetry version 1.8 or later installed
Install Python 3.11 if you haven't already (you can keep other Python versions installed)
Tell Poetry to use Python 3.11 specifically for this project by running:
poetry env use path/to/python3.11Run the installation command again:
make install
Cause
The pypanther-starter-kit specifically requires Python 3.11.* to function correctly. While tools like pyenv can manage multiple Python versions on your system, Poetry needs to be explicitly told which Python version to use for the virtual environment it creates for the project.
Poetry manages its own virtual environments, so there's no need to manually create a virtualenv. When Poetry is configured to use the correct Python version, it will automatically create and manage the virtual environment with all the necessary dependencies.