Guozhen AIGlobal AI field notes and model intelligence

English translation

Anaconda Tutorial: Installing Specific Versions of Python Packages

Published:

Category: Anaconda

Read time: 3 min

Reads: 0

Lesson #13Views are counted together with the original Chinese articleImages are preserved from the source page

AI Article Decision Snapshot

Turn the lesson into workflow, model, budget, and security checks before choosing tools.

Use this quick snapshot before leaving the article. It keeps the next search tied to practical AI software, model/API, cost, privacy, and implementation questions.

Workflow fit

Identify the real job behind the article: coding, research, document review, support, analytics, content, or internal automation.

Model or tool decision

Decide whether the next step is a software shortlist, an AI tool comparison, an API platform choice, or a model benchmark.

Budget and usage signal

Estimate seats, API calls, prompt volume, retries, review time, and fallback work before assuming the workflow is cheap.

Security and privacy review

Check whether source code, customer data, private documents, prompts, logs, or embeddings will enter the AI workflow.

In the previous tutorial, we learned how to search for available packages. Now, we’ll delve deeper into specifying the exact version of a package to install. When managing packages with Anaconda, you may occasionally need a particular package version—either to meet project-specific requirements or ensure compatibility across dependencies. This article demonstrates, through multiple practical examples, how to use the conda command to install packages at specific versions.

Installing a Package at a Specific Version

In Anaconda, you can install a package at a precise version using the conda install command. The basic syntax is:

conda install package_name=version_number

Here, package_name is the name of the package you wish to install, and version_number is the exact version you want.

Example 1: Installing a Specific Version of NumPy

Suppose your code relies on NumPy version 1.18.5 to run correctly. You can install that version with the following command:

conda install numpy=1.18.5

After executing the command, conda automatically resolves dependencies and prompts you to confirm the installation. Once confirmed, conda downloads and installs the specified NumPy version.

Important Notes

During installation, if another version of the same package is already installed, conda handles version conflicts—potentially removing the existing version to accommodate the requested one. To check which version is currently installed, use:

conda list numpy

Installing Multiple Packages at Specific Versions

You can also install several packages—each at a designated version—in a single command. For instance, suppose you need Pandas version 1.1.5 and Matplotlib version 3.3.2. Use:

conda install pandas=1.1.5 matplotlib=3.3.2

Example 2: Installing Multiple Packages at Specific Versions

Imagine setting up a data analysis environment requiring specific versions of Pandas and Matplotlib:

conda install pandas=1.1.5 matplotlib=3.3.2

With this command, conda resolves inter-package dependencies and ensures all selected versions are compatible and co-installable.

Installing Packages Within a Version Range

Anaconda also supports installing packages within a defined version range. For example, you might want any Scikit-learn version between 0.24 (inclusive) and 0.24.2 (exclusive). Specify it like this:

conda install scikit-learn>=0.24,<0.24.2

Example 3: Installing a Package Matching a Version Range

This command instructs conda to select and install the highest-compatible version of Scikit-learn satisfying the constraint—and automatically resolve its dependencies:

conda install scikit-learn>=0.24,<0.24.2

Listing Available Versions

Before installing a specific version, it’s helpful to know what versions are available. Use the following command to list all available versions of a given package:

conda search package_name

For example, to see all available versions of SciPy, run:

conda search scipy

This command displays a comprehensive list of versions—including build information and channel sources—to help you make an informed choice.

Summary

In this tutorial, we covered how to use conda to install Python packages at specific versions. Through concrete examples, we demonstrated installing individual packages, multiple packages simultaneously, and packages matching flexible version constraints. In upcoming tutorials, we’ll explore installing packages from different channels—highlighting Anaconda’s flexibility and robustness as a package management system.

We hope these examples deepen your understanding and confidence in using Anaconda for effective package management. If you have questions or feedback, feel free to leave a comment below!

Apply This Lesson

Turn this article into AI software, model, API, and security decisions.

English Article FAQ

Use this article as evidence before choosing AI tools

How should I use this AI Tutorials article?

Use it as the implementation or learning layer, then connect the idea to AI software buyer guides, tool comparisons, benchmarks, API choices, and security checks before making a production decision.

Is this English article different from the Chinese original?

The English edition is localized for global AI readers while preserving the original diagrams, screenshots, prompts, code examples, and source context from the Chinese article.

What should I read after Anaconda Tutorial: Installing Specific Versions of Python Packages?

Continue with AI Software Buyer Guides, AI Tools Workbench, Best AI Coding Agents, AI Model Benchmarks, OpenAI vs Anthropic API, or LLM Security Tools depending on the decision you need to make.

Can this article alone choose an AI product or model?

No. Treat the article as evidence and context, then validate fit with pricing, privacy requirements, integration effort, benchmark results, workflow tests, and fallback planning.

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...