DEV Community

Cover image for Environment Manager - Conda
Maxime HEBRARD
Maxime HEBRARD

Posted on • Edited on

1

Environment Manager - Conda

If you are testing programmes or developping your own I strongly suggest to look after an environment manager. An easy way to install libraries into dedicated environments in isolation from each other, and to keep track of what is installed where. A whildely used environment manager is conda

Install on Windows

Before reading this post, I suggest you follow Ubuntu on Windows (WSL).

  • Open 'Ubuntu'
  • Download Miniconda installer for Linux
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
Enter fullscreen mode Exit fullscreen mode
  • Install miniconda
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
Enter fullscreen mode Exit fullscreen mode
  • Press Enter to continue
  • Press Space to read through the licence
  • Key 'yes' to accept the licence
  • Press Enter to install miniconda3
  • Key 'yes' to confirm installation
  • Quit and restart 'Ubuntu'

At this point you will find a new information in your prompt that indicate in which conda environment you are currently in.

Win base

Install on MacOS

Before reading this post, I suggest you follow Improved Shell (MacOS).

  • Open 'Terminal'
  • Install miniconda from Homebrew
brew install --cask miniconda
Enter fullscreen mode Exit fullscreen mode
  • Configure conda for zsh
/opt/homebrew/bin/conda init zsh
Enter fullscreen mode Exit fullscreen mode
  • Quit and restart 'Terminal'

At this point you will find a new information in your prompt that indicate in which conda environment you are currently in.

macOS base

Usage

  • Update conda
conda update -n base -c defaults conda
Enter fullscreen mode Exit fullscreen mode
  • Create a new environment
conda create -n myEnvName
Enter fullscreen mode Exit fullscreen mode
  • Activate the environment
conda activate myEnvName
Enter fullscreen mode Exit fullscreen mode
  • Install libraries You can find libraries and how to install them either on Anaconda or pip
conda install ...
Enter fullscreen mode Exit fullscreen mode
pip install ...
Enter fullscreen mode Exit fullscreen mode
  • List all libraries in the current environment
conda list
Enter fullscreen mode Exit fullscreen mode
  • Exit an environment
conda deactivate
Enter fullscreen mode Exit fullscreen mode
  • Remove an environment
conda env remove -n myEnvName
Enter fullscreen mode Exit fullscreen mode
  • List the environements available
conda env list
Enter fullscreen mode Exit fullscreen mode

Next, I suggest you follow Cross Platform, Cross Language Text Editor - VSCode.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay