Conda Rename Python Environment: A Beginner’s Guide – Anaconda Tutorial

By | December 2, 2019

We can use conda command to create python environment very easily, here is a tutorial.

Install and Use Both Python 2 and Python 3 in Windows with Anaconda – Python Tutorial

However, how to rename a python environment if you want to change? In this tutorial, we will introduce you how to rename the environment, you can rename your environment by our tutorial.

List all python environments

First, we list all installed python environments and select one to rename.

conda env list

The environment list is:

conda list python environment

In this tutorial, we will rename py3 to py3.5

Rename py3 to py3.5

Anaconda does not provide conda rename command, we can copy and delete old one to implement it.

Copy py3 to py3.5

conda create --name py3.5 --clone py3

We will create a py3.5 environment, which is the same to py3 environment.

List all python environments again.

conda env list

We wil find there is a new python environment py3.5

conda list python environment for python 3.5

Delete old environment py3

conda remove --name py3 --all

You may look at:

conda remove python environment

Then you will find py3 is deleted and py3.5 is the same to py3, which means we have renamed py3 environment to py3.5.

List all python environments

conda rename py3 to py3.5

Leave a Reply