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
Limit setup.py for python version #5899
Conversation
Restrict setup.py for installs on any python 3.12 environments.
User claimed they were on python 3.11.5 when sharing screenshot, but |
Reformat to use single string
Codecov Report
@@ Coverage Diff @@
## main #5899 +/- ##
==========================================
- Coverage 87.08% 82.13% -4.96%
==========================================
Files 103 103
Lines 12485 12485
==========================================
- Hits 10873 10254 -619
- Misses 1612 2231 +619
Flags with carried forward coverage won't be shown. Click here to find out more. see 28 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@Burhan-Q yeah this is a good idea to avoid confusion. I don't see any 3.12 usage from our analytics, but I have seen this strange plot from https://pypistats.org/packages/ultralytics |
@glenn-jocher a few thoughts on where the python 3.12 numbers could come from (no clue on the 3.13)
I wanted to add this because the error thrown is so vague and if I hadn't noticed the other libraries, it would have been time consuming to troubleshoot. I'm only proposing this as a short-term fix until PyTorch (and any other libraries) have stable python 3.12 compatibility. |
@Burhan-Q oh yeah, that's a good point, we need to support locally built torch releases, which may include 3.12, so we can't limit the pip install to only <3.12 environments. It's likely we do support 3.12 as long as torch does. I haven't had time to try to build from source and check though. |
That's understandable. I don't know enough of the ins and outs for setuptools to know if this would be difficult, but I wonder if it would be possible to allow for different python versions under [dev] installs versus "vanilla" installs? Anyhow, I understand and will be on the lookout out for common python 3.12 errors in the meantime. |
@glenn-jocher sorry for the ping, but it looks like PyTorch is getting close-ish to a Python 3.12 release pytorch/pytorch#112882 I'm going to track this PR and once there are wheels built, I may try downloading one and test with Ultralytics. |
@Burhan-Q yeah sounds good :) |
|
Restrict
setup.py
for installs on anypython 3.12
environments. Since PyTorch does not yet support python 3.12, adding upper bound!=3.12.*
to prevent users from attempting installation when using python 3.12. Observed multiple users reporting issues in Discord related to attempted installation using python 3.12.Example of error shown during python 3.12 install
🤖 Generated by Copilot at 8fe8c03
Summary
⬆️🚫📝
Updated package metadata and documentation to reflect current status and requirements. Restricted
python_requires
insetup.py
to exclude future Python 3.12 version.Walkthrough
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Upping the Python version compatibility for Ultralytics package.
📊 Key Changes
ultralytics
package has been updated to support versions between 3.8 and before 3.12.🎯 Purpose & Impact
ultralytics
package. It provides clarity on which versions are officially supported, reducing the chances of encountering unexpected bugs due to version incompatibilities. 🐍✨