

Just like the pip command, this must be piped into a text file. Those all happen to be dependencies of black. Notice how packages that are installed with pip are shown. Wouldn’t it be nice to be able to recreate the environment from a file, like pip does with requirements.txt? Anaconda has you covered! With pip you use pip freeze to create the file with Anaconda its done with conda env export: You’ve put a lot of work into creating the perfect environment. In this case, I would have to install it separately with pip so that I would be running the most recent one. If you had previously added the conda-forge channel, black could have been specified as well. If you would like to add a certain channel to the ones that are search by default, the following command will do:Ĭonda create -name pybites python=3.7 beautifulsoup4 requests pytest

The following packages will be downloaded: Installing to the current environment is as simple as: If you are not currently in an “active” environment, Anaconda will assume that you want to install to the root/ base environment. You can either install them into your current environment or you can specify the environment to install them into. The name of the environment will be shown as well as its location:īeautifulsoup4 4.6.0 py27h3f86ba9_1 pkgs/mainīeautifulsoup4 4.6.0 p圓5h442a8c9_1 pkgs/mainīeautifulsoup4 4.6.0 p圓6h49b8c8c_1 pkgs/main List Virtual Environmentsĭon’t remember what you named your environment? Just what to see which ones you have created? You can view them all with conda env list.
#Conda install package in env no update how to
The comments at the end show you how to activate/deactivate your new environment. # To deactivate an active environment, use The following NEW packages will be INSTALLED:

Let’s create one that uses Python 3.7 and is called pybites:Įnvironment location: /home/mohh/anaconda3/envs/pybites Don’t know your default version? Simple run python -version to find out. If you do not specify a Python version, whatever your current default one is will be used.
