How to setup Anaconda path to environment variable ?

Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder. Package versions are managed by the package management system called conda.

What is the environment variable?

Environment variables basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the environment. The region from which this variable can be accessed or over which it is defined is termed as the scope of the variable.

Steps for setting up the environment variable:

Windows

  • Download Anaconda for Python. Make sure to download the “Python 3.7 Version” for the appropriate architecture.
    Anaconda-version-download-Windows
  • After the download is over, go through How to install Anaconda on windows? and follow the given instructions.
  • After the installation is done, we need to setup the environment variable.
    Go to Control Panel -> System and Security -> System
    Under Advanced System Setting option click on Environment Variables as shown below:
    Advanced System Settings



    Setting up Environment variable

  • Now, we have to alter the “Path” variable under System variables so that it also contains the path to the Anaconda environment. Select the “Path” variable and click on the Edit button as shown below:
  • We will see a list of different paths, click on the New button and then add the path where Anaconda is installed.
    Adding new Path
  • Click on OK, Save the settings and it is done !! Now to check whether the installation is done correctly, open command prompt and type anaconda-navigator. It will start the anaconda navigator App, if installed correctly.

Linux

In Linux, there are several ways to install Anaconda. But we will refer to the simplest and easy way to install Anaconda using terminal. Go through How to install Anaconda on Linux? and follow the instructions. Generally, the Path variable is automatically set in Linux at the time of installation, but it can also be set manually by following steps:

  • Go to Application -> Accessories -> Terminal
  • For setting up Environment Variable, type the following command in the Terminal with the use of Installation path:
    export ANACONDA = /home/nikhil/anaconda3

  • For setting up the Environment Value, type the following command in the Terminal with the use of Installation path:
    export PATH = $PATH:/home/nikhil/anaconda3/bin

  • It is done!! Now to check whether the installation is done correctly, open Terminal and type anaconda-navigator. It will start the anaconda navigator App, if installed correctly.
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.