yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

"What libraries should I install to use PyTorch and YOLOv5? I am using PyCharm and Visual Studio."

Open joseant7231 opened this issue 7 months ago • 2 comments

Search before asking

  • [x] I have searched the YOLOv5 issues and discussions and found no similar questions.

Question

Good morning, good afternoon, or good evening. I am using Visual Studio Code and also PyCharm with the Python language. I would like to perform image recognition on a video, but I am encountering errors with Torch and YOLOv5. Could you please help me by telling me which libraries I should install first? Thank you very much for your possible response.

Additional

Image

joseant7231 avatar Apr 27 '25 17:04 joseant7231

👋 Hello @joseant7231, thank you for your interest in YOLOv5 🚀! This is an automated response to help you get started quickly—an Ultralytics engineer will also assist you soon.

Please visit our ⭐️ Tutorials for detailed guides—including Custom Data Training and Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please include as much information as possible, such as dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Requirements

Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

😊 If you encounter further issues, please provide additional details or screenshots to help us assist you!

UltralyticsAssistant avatar Apr 27 '25 17:04 UltralyticsAssistant

Hi @joseant7231,

To use YOLOv5 for video recognition, install the required dependencies with:

pip install -r https://raw.githubusercontent.com/ultralytics/yolov5/master/requirements.txt

This installs PyTorch and all necessary libraries. For video processing specifically, ensure OpenCV is properly installed:

pip install opencv-python-headless

You can also clone the repository and install everything at once:

git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt

For detailed setup instructions, check our Quickstart guide.

pderrenger avatar Apr 28 '25 05:04 pderrenger

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

  • Docs: https://docs.ultralytics.com
  • HUB: https://hub.ultralytics.com
  • Community: https://community.ultralytics.com

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

github-actions[bot] avatar Oct 10 '25 00:10 github-actions[bot]