Skip to content

Conversation

@PrashantDixit0
Copy link

@PrashantDixit0 PrashantDixit0 commented Dec 16, 2025

This PR adds a Installation section to the Kaggle integration documentation:

  • Installation guide
  • Methods to resolve dependency conflicts

I have read the CLA Document and I sign the CLA

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Adds a clear Kaggle notebook installation and troubleshooting guide for Ultralytics YOLO11 docs. 📚🚀

📊 Key Changes

  • Introduces a new Installation section in docs/en/integrations/kaggle.md covering internet enablement, pip install, and verification steps
  • Adds troubleshooting guidance for common Kaggle dependency issues (upgrade/reinstall, --no-deps, kernel restart, version pinning)
  • Expands the FAQ and “common issues” content with Kaggle-specific install and dependency tips

🎯 Purpose & Impact

  • Reduces setup friction for users training YOLO11 in Kaggle notebooks by documenting required notebook settings and install commands
  • Improves success rate for first-time runs by outlining practical fixes for typical package resolver and import issues
  • Makes the Kaggle integration page more self-contained, lowering support burden and onboarding time

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages documentation Improvements or additions to documentation Notebook Ultralytics notebook, issues, updates and new features labels Dec 16, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @PrashantDixit0, thank you for submitting a ultralytics/ultralytics 🚀 PR! To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/ultralytics main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features. 📚
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. This is an automated message, and an Ultralytics engineer will assist soon. 🚀 If you have any questions, feel free to comment here.

Copy link
Member

@UltralyticsAssistant UltralyticsAssistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 PR Review

Made with ❤️ by Ultralytics Actions

Solid addition overall: the new Installation section makes the Kaggle page more self-contained and should reduce first-run friction. Main concerns are a few troubleshooting recommendations that can inadvertently break Kaggle environments (manual --no-deps dependency list and hard version pins) and one statement that downplays pip resolver warnings too strongly. Tightening those parts to be more conditional/fallback-oriented would make this guide safer and more reliable.

💬 Posted 5 inline comments


```python
!pip install --no-deps ultralytics
!pip install torch torchvision opencv-python matplotlib pillow pyyaml requests

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ HIGH: The --no-deps path lists a manual dependency set that is likely incomplete/incorrect for many Kaggle environments (e.g., missing ultralytics optional/runtime deps, and torch/torchvision versions must match CUDA + Kaggle image). This guidance risks breaking working environments. Prefer directing users to reinstall only ultralytics (and maybe opencv-python) or to pin versions based on the Kaggle image, rather than prescribing a broad manual dependency list.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is required to install with --no-deps as numpy, opencv and torch are already installed in Kaggle notebook which raises dependency conflict while installing Ultralytics

If you encounter specific version conflicts, you can pin compatible versions:

```python
!pip install ultralytics opencv-python==4.8.1.78 numpy==1.24.3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ HIGH: Pinning opencv-python==4.8.1.78 numpy==1.24.3 is likely to conflict with Kaggle’s preinstalled stack (and with different Python versions), and can downgrade/upgrade in ways that break other libs. Consider removing hard pins or rephrasing to recommend pinning only when an error message indicates a required version, and to match Kaggle’s preinstalled versions.

!pip install ultralytics
```

For the latest development version, you can install directly from GitHub:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 MEDIUM: Installing from git+https://github.com/ultralytics/ultralytics.git on Kaggle can be fragile because Kaggle images often lack git (or block it) and users may hit authentication/proxy issues. Consider either linking to a known-working Kaggle notebook as the recommended path, or add a short fallback note (e.g., install the PyPI package instead) to prevent a dead-end.

**Error: "ERROR: pip's dependency resolver does not currently take into account..."**
- Solution: This is usually a warning and can be safely ignored. The installation typically succeeds despite the message
- Alternatively, use Method 2 above to install without dependency resolution

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 MEDIUM: Saying the dependency resolver message "can be safely ignored" is risky; in some cases it indicates an incompatible environment that will fail at import/runtime. Consider wording this as "often a warning" and instruct users to run ultralytics.checks() (or a quick import + inference) to confirm everything works, and then apply the troubleshooting methods if it doesn’t.


```python
!pip install ultralytics
# Then click "Restart Kernel" from the notebook menu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 LOW: The code block mixes shell-style !pip with a UI instruction comment. Since Kaggle UI labels vary, consider using more general wording like "restart the kernel/session" outside the code block, or ensure the label matches Kaggle’s current UI to avoid confusion.

@PrashantDixit0
Copy link
Author

@kayselmecnun @glenn-jocher Please review this PR, which improves documentation to resolve common Ultralytics installation issues in Kaggle notebooks.

@glenn-jocher
Copy link
Member

Thanks @PrashantDixit0 — we’ll review this shortly; in the meantime please keep the new Installation/troubleshooting guidance consistent with the existing flow in the Kaggle integration docs and add a quick caution around using --no-deps / version pinning so users don’t silently end up with missing requirements.

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

Labels

dependencies Dependencies and packages documentation Improvements or additions to documentation Notebook Ultralytics notebook, issues, updates and new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants