To install YOLO for AI object detection projects, use the official Ultralytics package in a Python 3.8 or newer environment with PyTorch 1.8 or newer, then run pip install -U ultralytics. Your first test is one command: yolo predict model=yolo26n.pt. The pretrained weights download automatically, the model runs on bundled sample images, and the annotated results save to runs/detect/predict on a first run. The open-source licence is AGPL-3.0 with a $0 software licence fee under AGPL terms. If you plan to ship YOLO inside a closed commercial product or service, read the licence section before you build, because Ultralytics offers a separate Enterprise License for that use.
Quick Answer
To install YOLO for AI object detection projects, use the official Ultralytics package in a Python 3.8 or newer environment with PyTorch 1.8 or newer, then run pip install -U ultralytics. Your first test is one command: yolo predict model=yolo26n.pt. The pretrained weights download automatically, the model runs on bundled sample images, and the annotated results save to runs/detect/predict on a first run. The open-source licence is AGPL-3.0 with a $0 software licence fee under AGPL terms. If you plan to ship YOLO inside a closed commercial product or service, read the licence section before you build, because Ultralytics offers a separate Enterprise License for that use.
In this article
- How we checked this guide
- Read this first: what YOLO is, licence, and project status
- What YOLO replaces, and what it does not
- How detection, training, and export fit together
- Routes to install YOLO for AI object detection projects
- Requirements before you install
- Step 1: install YOLO for AI object detection projects
- Step 2: run your first prediction
- Step 3: point YOLO at your own images and video
- Step 4: train on your own objects and export the model
- First-run security steps you must not skip
- Backup and update routine
- Common errors and fixes
- Tips and tricks that save money
- The real cost maths
- When not to install YOLO for AI object detection projects
- Pros and cons
- Our verdict
- FAQ
- Strategic Pivot
- Sources
How we checked this guide
We checked the official Ultralytics documentation on December 5, 2026. That covers the YOLO model family description, the two-command start, the AGPL-3.0 and Enterprise licensing options, and the recommendation that YOLO26 and YOLO11 are the stable production choices. We also checked the official Ultralytics Quickstart install page on December 5, 2026. That covers the pip, conda, Docker, source, and headless install routes, the Python and PyTorch minimum versions, the first CLI prediction, the first Python prediction, and the settings file.
For the paid comparison, we checked the official Roboflow pricing page on December 5, 2026. Every Roboflow figure below comes from that official page, including its Free Tier and Core plan, not from a roundup or review site.
Read this first: what YOLO is, licence, and project status

YOLO means “You Only Look Once”. In plain words, the model looks at an image once and predicts boxes, class labels, and confidence scores for the objects it finds. That single-pass design is why YOLO became the default starting point for real-time detection: counting products on a shelf, spotting a helmet on a worker, finding a defect on a part, or tracking a forklift in a warehouse camera feed.
The current released family in the official documentation is YOLO26, with YOLO11 also recommended for stable production workloads. The documentation says YOLO26 builds on recent deep learning research with optional NMS-free end-to-end inference and optimized edge deployment. You do not need to understand that sentence to install YOLO. You need to know which model file to start with, and the documented starting point is yolo26n.pt, the nano detection model whose weights download automatically on first use.
Licence is the part many install guides skip, and skipping it can cost you later. Ultralytics offers two licensing options. The first is AGPL-3.0, an OSI-approved open-source licence. Under AGPL terms, the software licence fee is $0, and the licence is designed so improvements to open-source projects return to the community. The second is the Ultralytics Enterprise License, which allows Ultralytics software and AI models to be integrated into business products and services, including internal tools, automated workflows, and production deployments, bypassing the open-source requirements of AGPL-3.0.
Read that carefully before you sell anything built on YOLO. Prototyping, learning, research, and open-source work fit the AGPL route naturally. Shipping YOLO inside a closed-source app, device, or paid service is exactly the situation the Enterprise License exists for. This guide cannot give you legal advice, and the Enterprise price is not a public list price in the documentation we checked. If your project will be sold or deployed as a closed commercial system, contact Ultralytics Licensing and get the answer in writing before launch, not after a customer asks.
What YOLO replaces, and what it does not
YOLO replaces the slow first version of a detection job. Before YOLO, a small team that wanted objects found in images often faced three bad options: pay a person to inspect every image, write fragile colour-and-shape rules that break when lighting changes, or hire a machine-learning engineer to build a detector from scratch. YOLO turns that into an install, a pretrained model, and a test on your own photos in the same afternoon.
YOLO pairs naturally with the neighbouring tools in this series. Our Grounding DINO guide covers finding objects from typed words when you have no labelled dataset yet. Our Segment Anything Model guide covers turning a box or point into a precise mask. A practical workflow uses Grounding DINO to draft boxes, a human to correct them, and YOLO to learn the fixed classes your business cares about. Each tool does the job it is best at.
YOLO does not replace judgement about what counts as correct. A confidence score is not a guarantee. A model can box the wrong product, miss a partly hidden item, or count the same object twice in a crowded shelf photo. Your test images, your thresholds, and your review process supply the business meaning. The model supplies speed.
Finally, YOLO does not replace deployment engineering. Running a model on one image is easy. Running it reliably on a camera feed at 2 a.m., with logging, restart behaviour, and a person who knows what a failure looks like, is a system. This guide gets you installed and honest about that gap, so you can decide how much system your project really needs.
How detection, training, and export fit together
The official command grammar reflects those loops. Most yolo commands follow yolo [TASK] MODE ARGS. The task answers what you want from an image: detect, segment, classify, pose, and others. The mode answers how you use the model: train, validate, predict, export, track, or benchmark. The arguments configure the run, from model= to imgsz=640. In practice, the task is usually read from the model file, so a first prediction needs only the mode and a model name.
Routes to install YOLO for AI object detection projects
| Route | Best for | Skip if | What you use |
|---|---|---|---|
| pip install from PyPI | Most operators starting on a laptop, workstation, or server | Your Python environment is shared and fragile | pip install -U ultralytics in Python 3.8+ with PyTorch 1.8+ |
| conda-forge environment | Teams that want Python, torchvision, and GPU PyTorch resolved together | You do not use conda anywhere else | conda create --name ultralytics-env -c conda-forge python=3.11 ultralytics torchvision -y |
| Official Docker image | Servers and GPU machines where isolation matters | You are still learning what a terminal is | ultralytics/ultralytics:latest with GPU device access |
| Clone and editable install | Developers who need the latest source or local changes | You only want to run predictions | Clone the Ultralytics GitHub repository, then pip install -e . |
| Headless variant | Cloud VMs, containers, and CI without a display | You need OpenCV GUI windows on a desktop | pip install ultralytics-opencv-headless |
| Hosted vision platform | Teams that want labelling, training, deployment, and support in one subscription | You can run Python and want local control | A paid platform such as Roboflow, priced in the cost maths below |
The pip route is the right default for most small businesses. It is the first route in the official Quickstart, it installs all required dependencies, and it gets you to a first prediction in two commands. Choose conda when GPU PyTorch resolution is your pain point. Choose Docker when the machine is shared or the project must be reproducible. Choose the source install only when you have a reason to read or change the code.
Requirements before you install
The official Quickstart states the floor clearly: install or update the ultralytics package in a Python 3.8 or newer environment with PyTorch 1.8 or newer. Every install method installs all required dependencies listed in the project’s pyproject.toml. That floor is low on purpose. A modern laptop clears it easily. The real requirement is not the floor. It is a clean environment you can rebuild.
Create a dedicated environment for YOLO work. A shared Python environment full of unrelated packages is how a working detector becomes a broken one after an unrelated upgrade. A dedicated environment also makes your backup honest: you can record the exact package versions that produced a good model and recreate them on a new machine.
Servers without a display need the headless variant. The Quickstart is explicit: on cloud VMs, containers, and CI pipelines, install the variant that depends on opencv-python-headless to avoid libGL errors. It provides the same functionality and API as ultralytics, minus OpenCV’s GUI components. If your first server install fails with a libGL error, this is almost certainly why.
Step 1: install YOLO for AI object detection projects

Start with the pip route unless you have a specific reason not to. Create and activate your dedicated environment, then install or update the package:
pip install -U ultralyticsThe -U flag matters. It installs the current package or updates an existing one, so you are not debugging last year’s version against this year’s documentation. After the install, confirm the yolo command exists by running your first prediction in Step 2. A prediction that downloads weights and saves annotated images proves more than a version print ever will.
conda create --name ultralytics-env -c conda-forge python=3.11 ultralytics torchvision -y
conda activate ultralytics-envIn a CUDA environment, add the pytorch-gpu metapackage to the same command so conda resolves a CUDA-enabled PyTorch build:
conda create --name ultralytics-env -c conda-forge python=3.11 ultralytics torchvision pytorch-gpu -y
conda activate ultralytics-envInstall everything from conda-forge. PyTorch no longer publishes new releases to the pytorch conda channel, and mixing channels is a reliable way to create a conflict you will spend an afternoon untangling.
sudo docker pull ultralytics/ultralytics:latest
sudo docker run -it --ipc=host --device nvidia.com/gpu=all ultralytics/ultralytics:latestDocker suits a shared server, a reproducible deployment, and a machine where Python versions are already a battlefield. It is a poor first step for a beginner who has never used a container, because every path, volume mount, and GPU flag becomes a second lesson on top of YOLO itself. Learn YOLO first. Containerise second.
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
pip install -e .pip install ultralytics-opencv-headlessUse only official routes. Do not download a “YOLO free installer” bundle from a download portal, and do not run install scripts from a fork you have not read. The addresses in this guide are the ones the project’s own documentation gives: PyPI for the package, conda-forge for the conda route, Docker Hub for the official image, and the Ultralytics GitHub repository for source.
Step 2: run your first prediction
Run the documented first prediction from your terminal:
yolo predict model=yolo26n.ptThe pretrained yolo26n.pt weights download automatically, the model runs on two bundled sample images, and the command prints where it saved the annotated results, runs/detect/predict on a first run. Open those annotated images. You should see boxes with class labels and confidence scores. That output proves four things at once: the package installed, the weights downloaded, the model loaded, and the prediction pipeline works on your machine.
yolo predict model=yolo26n.pt source='https://github.com/ultralytics/assets/releases/download/v0.0.0/bus.jpg'Then point it at one of your own images. Replace the source with your file path:
yolo predict model=yolo26n.pt source=your-photo.jpgChoose a first image that represents your real work but is not your hardest case: a clear product photo, a tidy shelf, or a workshop image where the object is plainly visible. You are testing the install first, not the model’s limits. Judge the output like a customer would. Is the box tight around the object? Does it include a second object you did not ask for? Did it miss the object entirely? If the box is right, the install works. If it is wrong, you have learned something about your dataset, not yet something about YOLO.
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
results = model("https://ultralytics.com/images/bus.jpg", save=True)The results object is a list with one entry per image, carrying boxes, masks, keypoints, or class probabilities depending on the task. That structure is where business output begins. A saved annotated image helps a person. A structured result, with box coordinates, class names, and confidence scores, feeds a spreadsheet, a database, a counter, or a review queue. Decide early which output your project needs, because it changes how you write the rest of the code.
yolo predict model=yolo26n.pt source=0 show=TrueA live camera adds lighting, motion, and framing problems that a still photo does not have. Prove the still-photo case first, then earn the video case. Teams that start with a live feed often debug camera problems and model problems at the same time, and fix neither.
Step 3: point YOLO at your own images and video
Build a small test set before you tune anything. Pick ten images that cover your real range: the clean shot, the cluttered shot, the small object, the partly hidden object, the poor-lighting shot, and the image where the object is absent. Run the same settings on all ten. A setting that works on one hero image and fails on the other nine is not a workflow yet. Keep this test set unchanged while you tune, or you will chase your own moving target.
Tune one dial at a time. Raise the confidence threshold and you get fewer, stricter boxes. Lower it and you get more boxes, including more junk. Raise imgsz and small objects become easier to find, at the cost of speed. Change both together and you will not know which change helped. Record the settings beside the results, every time. A folder of outputs without the settings that produced them is evidence you cannot use.
Keep a review queue for low-confidence work. Boxes near your threshold, images with no detections, and images with surprising extra boxes deserve human eyes. A detector that quietly returns nothing for a shelf photo is more dangerous than one that returns a messy box you can reject. The review queue is also your training-data factory: every corrected box is a labelled example for Step 4.
Step 4: train on your own objects and export the model

First-run security steps you must not skip
YOLO is a local package, not a hosted account with a login page. Your first-run security job is therefore about the machine, the files, the model weights, and any network surface you create around it.
Download weights and code only from official routes. The package comes from PyPI, the source from the Ultralytics GitHub repository, and the pretrained weights download automatically from Ultralytics assets. A model file is code your system loads. Its source matters as much as any other software source. A “free YOLO weights” file from an unknown site is not a shortcut. It is an unreviewed binary in your business.
Respect the licence before you ship. The AGPL-3.0 route and the Enterprise License route lead to different obligations. Decide which route your project is on while it is still a prototype, and get the Enterprise answer in writing if your product will be closed and commercial. Licence surprises are cheapest before launch.
Backup and update routine
Back up the working combination, not only the code. Your backup set is the environment definition, the model weights you use, your dataset, your class list, your training settings, your validation results, your exported model, and your test set with expected outputs. That set lets you rebuild the same behaviour on a new machine. Code alone does not.
Update deliberately. Install a newer package version into a separate environment first, run your ten-image test set, and compare boxes before you replace the working setup. Model behaviour can change between versions, and your thresholds were tuned against the behaviour you tested. Promote the update only when the test set still passes.
Common errors and fixes
A libGL error on a server means the standard OpenCV dependency wants GUI libraries your headless machine does not have. Install the headless variant, pip install ultralytics-opencv-headless, which the official Quickstart recommends for cloud VMs, containers, and CI. Do not install desktop packages on a server to satisfy a detector.
A Docker container that cannot see the GPU points at versions and flags. On Linux, CDI device requests require Docker 28.2.0 or newer and NVIDIA Container Toolkit 1.18 or newer. Use --device nvidia.com/gpu=all instead of the legacy --gpus all, which can lose GPU access after host daemon reloads.
No detections on your own image usually means the object is not in the pretrained model’s class list, the confidence threshold is too strict, or the object is too small at the current image size. Test on a clear image with a common object first to prove the install. Then lower the confidence threshold slightly, raise imgsz, and inspect again. If your object is a specific product or defect, the honest fix is training on your own labelled examples.
Tips and tricks that save money
Prove the pretrained model on ten images before you rent anything. A free local test that fails on your own photos saves a paid platform month spent learning the same lesson. If the pretrained model already finds your objects well enough, you may not need training at all.
Our Segment Anything Model guide covers the neighbouring job where a box becomes a precise mask. Keep each tool on the job it does best: YOLO finds and tracks, segmentation cuts precisely, and a human reviews what the business cannot afford to get wrong.
The real cost maths

YOLO itself costs $0 in software licence fees under AGPL-3.0. That sentence is true and incomplete. The real cost is the machine that runs it, the time you spend labelling and tuning, the review time that keeps bad boxes out of your business output, and, for closed commercial products, a possible Enterprise License whose price is set by contact with Ultralytics, not by a public list price we can quote.
The paid comparison is Roboflow. On the official pricing page checked on December 5, 2026, the Free Tier is $0 with 10 credits included a month, described as enough to train about 30 models or run 80,000 inferences. Core is $39 per month, billed monthly, described as enough to train about 60 models or run 160,000 inferences. Additional prepaid credits start at $4 and expire after one year. Additional on-demand credits cost $6 and require a linked credit card. Enterprise is custom pricing.
Now the scenario. Imagine a small warehouse that photographs 3,000 shelf and pallet images a month and wants each image checked for boxes, pallets, and a forklift. The lean route is YOLO on a computer the warehouse already owns. The licence line is $0 a year under AGPL terms for internal open-source use.
The break-even line against Roboflow Core is $39 a month, which is $468 a year, for your labelling time, tuning time, electricity, and upkeep combined. If setup and review cost you less than $39 a month in time you would otherwise sell, the local route wins on cash. If a staff member spends two afternoons a month rescuing bad detections, the platform may be cheaper than it looks.
The full-stack route changes the answer. Roboflow is not only a detector. Its plans include model inference, model training, deployment options, workflows, labelling features, and support structure. If your real job includes team labelling, dataset management, hosted deployment, and support, the $39 a month buys structure that a local YOLO install does not provide. Comparing a $0 detector licence with a $39 platform month is fair only when detection on your own machine is the whole job.
Licence is the cost driver many teams miss. Internal tools and open-source projects fit the AGPL route. A closed commercial product or paid service built on YOLO is the Enterprise License case. That licence cost is real, it is not published as a simple list price in the documentation we checked, and it belongs in your maths before you promise a customer a price. The honest comparison is $468 a year for Roboflow Core billed monthly against your local hardware share, your time, and any Enterprise License quote your product requires.
When not to install YOLO for AI object detection projects
Do not install YOLO when nobody on the team can run a Python environment. The documented route is a package install, a prediction command, and, for custom objects, a dataset and a training run. If that sentence already sounds like a support ticket, a hosted platform is the honest choice.
Do not use YOLO as an unattended safety or billing counter without evaluation. A detector is excellent for first passes, alerts, and review queues. A safety, billing, or compliance count needs measured accuracy on your own images, a review process, and a record of failures. Boxes alone do not provide that record.
Do not ship a closed commercial product on YOLO without settling the licence. AGPL-3.0 and the Enterprise License are different routes with different obligations. A product launch is the wrong moment to discover which route you needed. Settle it during the prototype, in writing.
Pros and cons
Pros
- $0 AGPL-3.0 software licence fee for open-source use
- Two-command start: install the package, run a prediction
- Pretrained weights download automatically on first use
- One package and CLI for detection, segmentation, tracking, training, and export
- YOLO26 and YOLO11 recommended for stable production workloads
- pip, conda, Docker, source, and headless install routes
- Export to ONNX, TensorRT, and OpenVINO for edge and cloud deployment
- Local workflow keeps private images on your machine
Cons
- AGPL-3.0 obligations do not fit every closed commercial product
- Enterprise License price requires contact, not a public list price
- Custom objects require labelled data and training
- Confidence scores are not guarantees; review is required
- GPU PyTorch and Docker GPU setup need version care
- No vendor support desk on the open-source route
- Accuracy on your images must be measured, not assumed
- A detector alone is not a complete production system
Our verdict
Install YOLO for AI object detection projects when your real job is finding known objects fast, on hardware you control, with a team that can run Python. Start with pip install -U ultralytics, run yolo predict model=yolo26n.pt, and judge the annotated output on one real photo from your own work before any batch.
The maths favors YOLO on hardware you already own for internal and open-source use: $0 in licence fees against $39 a month, $468 a year, for Roboflow Core billed monthly. The break-even line is $39 a month for your labelling time, tuning time, electricity, and upkeep. Choose the nano model first because the documentation starts there. Move to a larger model or a training run only when your test set shows errors that justify the cost.
Choose Roboflow when you need its labelling, training, deployment, or support structure. Choose the Ultralytics Enterprise License route, with a written quote, when you will ship YOLO inside a closed commercial product or service. Choose YOLO locally when the objects are known, the machine is yours, and speed matters.
Respect the limits either way: YOLO finds what it was trained to find, at the threshold you set, on images like the ones you tested. Prove it on your worst photos, keep a review queue, record your settings, and let the model earn each batch.
FAQ
Is YOLO free for a business?
The Ultralytics YOLO software licence fee is $0 under AGPL-3.0, an OSI-approved open-source licence designed so improvements return to the community. For development and production use inside business products and services without AGPL obligations, Ultralytics offers an Enterprise License by contact. Internal and open-source use fits the AGPL route. A closed commercial product should settle the licence before launch.
What is the easiest way to install YOLO for AI object detection projects?
Use a Python 3.8 or newer environment with PyTorch 1.8 or newer, then run pip install -U ultralytics. Follow it with yolo predict model=yolo26n.pt. The pretrained weights download automatically and the annotated results save to runs/detect/predict on a first run. That two-command test proves the install on your machine.
Which YOLO model should I use first?
Start with yolo26n.pt, the nano detection model in the official Quickstart. The documentation recommends YOLO26 and YOLO11 for stable production workloads. Judge the nano model on your own test images first. Move to a larger model only when measured errors, not a benchmark chart, justify the extra cost in speed and memory.
Do I need a GPU to install YOLO?
No. YOLO runs on CPU, and the nano model is light enough for a first laptop test. A GPU matters for training and for video-speed work. If you use a GPU, install a PyTorch build that matches your CUDA environment, or use the conda pytorch-gpu metapackage from conda-forge. On headless servers, install ultralytics-opencv-headless to avoid libGL errors.
Why does YOLO miss my product in photos?
The pretrained model only knows the classes it was trained on, and your product may not be one of them. First prove the install on a clear image with a common object. Then lower the confidence threshold slightly, raise imgsz for small objects, and test again on the same images. If the object is specific to your business, label examples and train. That is the normal YOLO workflow, not a failure of the install.
Strategic Pivot
Before you rent a vision platform for a folder of warehouse photos, run your own numbers. Our free AI Cost Calculator turns a subscription price and your monthly image volume into a break-even line you can defend. Two minutes there can show whether $39 a month is cheap, expensive, or irrelevant next to the computer already sitting in your office.
Sources
- Ultralytics YOLO documentation: https://docs.ultralytics.com/
- Ultralytics Quickstart install guide: https://docs.ultralytics.com/quickstart
- Ultralytics GitHub repository: https://github.com/ultralytics/ultralytics
- Roboflow pricing: https://roboflow.com/pricing
- Grounding DINO guide: https://aitbizhub.com/use-grounding-dino-for-ai-object-detection/
- Segment Anything Model guide: https://aitbizhub.com/use-segment-anything-model-for-image-segmentation/
Price note — updated December 5, 2026: Prices in this post were checked on December 5, 2026. When you are reading this, the price may be lower or higher. Check the official pricing page before you buy.
Pros
- $0 AGPL-3.0 software licence fee for open-source use
- two-command start with pip install and first prediction
- pretrained weights download automatically
- one package and CLI for detection, segmentation, tracking, training, and export
- YOLO26 and YOLO11 recommended for stable production
- pip, conda, Docker, source, and headless routes
- export to ONNX, TensorRT, and OpenVINO
- local workflow keeps private images on your machine
Cons
- AGPL-3.0 obligations do not fit every closed commercial product
- Enterprise License price requires contact
- custom objects require labelled data and training
- confidence scores are not guarantees
- GPU PyTorch and Docker GPU setup need version care
- no vendor support desk on the open-source route
- accuracy must be measured on your images
- a detector alone is not a complete production system
Install YOLO for AI object detection projects when your real job is finding known objects fast, on hardware you control, with a team that can run Python. Start with pip install -U ultralytics, run yolo predict model=yolo26n.pt, and judge the annotated output on one real photo from your own work before any batch. The maths favors YOLO on hardware you already own for internal and open-source use: $0 in licence fees against $39 a month, $468 a year, for Roboflow Core billed monthly. The break-even line is $39 a month for your labelling time, tuning time, electricity, and upkeep. Choose the nano model first because the documentation starts there. Move to a larger model or a training run only when your test set shows errors that justify the cost. Choose Roboflow when you need its labelling, training, deployment, or support structure. Choose the Ultralytics Enterprise License route, with a written quote, when you will ship YOLO inside a closed commercial product or service. Choose YOLO locally when the objects are known, the machine is yours, and speed matters. Respect the limits either way: YOLO finds what it was trained to find, at the threshold you set, on images like the ones you tested. Prove it on your worst photos, keep a review queue, record your settings, and let the model earn each batch.
