> For the complete documentation index, see [llms.txt](https://hs764.gitbook.io/cee-5735/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hs764.gitbook.io/cee-5735/anaconda/managing-conda-environments/using-terminal.md).

# Using Terminal

### Creating Environment

`conda create` creates a new environment in the *envs* folder of your *anaconda3* installation (for example, on my Mac, the location is */Applications/anaconda3/envs)*. We can additionally specify the python version when creating the environment.

```
$ conda create -name project1 python=3.7
```

{% hint style="warning" %}
If you are on MacOS and using the zsh shell, you may have problems using conda. [Using Anaconda with zsh ->](/cee-5735/anaconda/managing-conda-environments/zsh.md)
{% endhint %}

An environment is activated by calling `conda activate` with its name. Any scripts we run while the environment is activated will use the packages & versions installed within that environment.&#x20;

```
$ conda activate project1
```

### Managing Packages

We can easily add, upgrade, downgrade, and remove packages in the current environment with these commands. [More info ->](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#updating-packages)

```bash
# list of installed packages in environment
$ conda list
# add package: use conda install [package name]
$ conda install -c conda-forge tensorflow
# update to latest version: use conda update [package name]
$ conda update tensorflow
# if downgrading version, specify version during install
$ conda install tensorflow=1.1
# remove package: use conda remove [package name]
$ conda remove tensorflow
```

### Deactivating Environment

To deactivate the conda environment, use `conda deactivate`. Note that you do not need to activate the environment to manage packages: if an environment is deactivated, you can specify the environment name with the commands. [More info ->](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#updating-packages)

```
$ conda deactivate
```

### Deleting Environment

If you wish to delete the environment completely, navigate to the *envs* folder of your *anaconda3* installation and remove the correct directory.

```bash
$ cd /Applications/anaconda3/envs
$ rm -r project1
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hs764.gitbook.io/cee-5735/anaconda/managing-conda-environments/using-terminal.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
