Guozhen AIGlobal AI field notes and model intelligence

English translation

Creating New Environments with Conda

Published:

Category: Anaconda

Read time: 3 min

Reads: 0

Lesson #6Views 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 article, we covered how to install Anaconda and configure its environment variables so that the conda command is readily available in your terminal. In this article, we’ll dive deeper into using conda to create new environments—enabling you to manage different Python projects and their respective dependencies effectively.

What Is a Conda Environment?

In Python development, a conda environment is an isolated workspace containing its own Python interpreter, packages, and dependencies. Key advantages of using conda to manage environments include:

  • Isolation: Environments are fully independent, preventing dependency conflicts.
  • Flexibility: You can create distinct environments tailored to specific project requirements—including different versions of packages.
  • Reproducibility: Team members can replicate identical environments for consistent development and testing.

Creating a New Environment

Creating a new environment with conda is straightforward. Use the following command:

conda create --name <environment-name> python=<python-version>
  • --name: Specifies the name of the new environment.
  • python=<python-version>: Optional; specifies the Python version to install (e.g., 3.9, 3.11).

Example

Suppose you want to create an environment named myenv with Python 3.9. Run:

conda create --name myenv python=3.9

Upon executing this command, conda will:

  1. Compute and display the list of packages and versions to be installed.
  2. Prompt you to confirm installation. Type y and press Enter to proceed—the environment will then be created, required packages downloaded, and configuration completed.

After confirmation, you’ll see output similar to:

## Package Plan ##
...
Proceed ([y]/n)? y

Activating the New Environment

Once the environment is created, you can activate it. After activation, all commands and scripts executed in the terminal will use the Python interpreter and packages from that environment.

To activate an environment, run:

conda activate <environment-name>

For example, to activate the myenv environment just created:

conda activate myenv

After activation, your terminal prompt will typically change to indicate the currently active environment (e.g., (myenv) $).

Optional: Creating an Environment with Specific Packages

You can also specify packages to install during environment creation. For instance, to set up a data analysis environment pre-installed with numpy and pandas using Python 3.8:

conda create --name data_env python=3.8 numpy pandas

This creates an environment named data_env, installing Python 3.8 along with numpy and pandas.

Common Options for Environment Creation

Here are some frequently used options when creating environments:

  • --clone <existing-environment-name>: Clones an existing environment—faster than building from scratch, ideal when replicating identical configurations.
  • --file <environment-file>: Reads package dependencies from a file (e.g., environment.yml) to create the environment.

For example, to clone the base environment into a new one named my_clone:

conda create --name my_clone --clone base

Summary

In this article, we walked through how to create new conda environments—including core syntax, practical examples, and commonly used options. By leveraging separate environments, you gain precise control over project dependencies, ensuring clean, reproducible, and conflict-free development setups.

In the next article, we’ll explore how to activate and deactivate environments—and seamlessly switch between them—making your development workflow more flexible and efficient. Stay tuned!

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 Creating New Environments with Conda?

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...