- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add packages to Anaconda environment in Python
There are multiple ways by which we can add packages to our existing anaconda environment.
Method 1 − One common approach is to use the “Anaconda Navigator” to add packages to our anaconda environment. Once “Ananconda Navigator” is opened, home page will look something like −
Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not.
It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it. Let's suppose tensorflow packages are not installed in your computer, I can simply search the required package(like tensorflow), select it and click on apply to install it.
Method 2 − Another way of installing packages is by the use of terminal or an Anaconda Prompt −
conda install opencv
Above command will install OpenCV package into your current environment.
To install specific a specific version of a opencv package −
conda install opencv-3.4.2
We can install multiple packages at once, such as OpenCV and tensorflow −
conda install opencv tensorflow
Note − It is recommended to install all required packages at once so that all of the dependencies are installed at once.
To install a specific package such as opencv into your existing environment “myenv”(in case you have a virtual environment to install project specific packages).
conda install –name myenv opencv
Method 3 − If the package is not available in our conda environment or through anaconda navigator, we can find and install the package with another package manager like pip.
We can install pip in our existing conda environment by simply giving the command −
conda install pip
And your screen will be shown an output something like −
Now if you want to install any particular package, through pip in conda environment, we can do it like −
Above we have installed opencv package through pip in conda environment.
Viewing a list of installed packages
We can use the anaconda prompt, to list all of the packages in the active environment −
- Packages in Python
- How to install pandas using Anaconda?
- How to install Selenium package in Anaconda?
- Python Virtual Environment
- Python Environment Variables
- How to create python namespace packages in Python 3?
- What are the packages in Python?
- CGI Environment Variables in Python
- Capacity To Ship Packages Within D Days in Python
- How to develop programs with Python Namespaced Packages?
- How to create a virtual environment in Python?
- Packages in Java
- Packages in C#
- How to organize Python classes in modules and/or packages
- What is PYTHONPATH environment variable in Python?