Permanently set environment variables for anaconda

After installing anaconda, it shows install seccessful, but entering anaconda terminal shows "command not found"

The reason is that the environment variable is not added, and the environment variable is added to the installation path as follows:

import PATH=/home/li/anaconda2/bin:PATH

It is found that although anaconda can be opened, it still cannot be used when the terminal is opened again, and the environment variable needs to be added again

Use the method below to do it once and for all

1. Enter $sudo gedit /etc/profile in the terminal to open the profile file.

sudo gedit/etc/profile

2. Add a line at the end of the file: export PATH=/home/grant/anaconda2/bin:$PATH, replace "/home/grant/anaconda2/bin" with your actual installation path

3. Restart ubuantu and enter anaconda again

anaconda

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324794708&siteId=291194637