Python > 3.13 not supported
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 279
- Forks
- 177
- PR merge metrics
- No merged PRs in 30d
Description
Hi py4DSTEM team,
Thank you for this excellent software. I am reporting a compatibility issue regarding the upcoming (or current) use of Python 3.13. While issue #710 is considered, here a quick fix is suggested for convenience of users.
Problem:
Python 3.13 is no longer compatible with NumPy 1.x versions (see NumPy 2.1.0 Release Notes). Since py4DSTEM currently relies on NumPy 1.x logic/dependencies, users attempting to install it on Python 3.13 will encounter installation failures or runtime crashes.
Evidence:
Similar issues have been documented across the ecosystem, such as in LangChain #26026, where it was confirmed that numpy < 2.0 fails on Python 3.13. You can also update your python, make a virtual environment and reproduce the error.
Suggested Fix:
Until py4DSTEM is fully migrated to NumPy 2.0+, I suggest adding an upper bound to the python_requires constraint in setup.py (and pyproject.toml if applicable) to prevent broken installs:
python
Current
python_requires=">=3.10"
Proposed
python_requires=">=3.10, <3.13"
Use code with caution.
This will ensure users are directed to a compatible Python environment (3.10–3.12) by pip automatically.
Best regards,
Alireza
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Check setup.py and, if present, pyproject.toml for the python_requires constraint. First reproduce the installation issue in a Python 3.13 virtual environment, then verify that the declared supported range excludes Python 3.13 while retaining Python 3.10–3.12.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100