After installing anaconda offline on Linux, pip install cannot be used in the virtual environment.

报错:The program 'pip' is currently not installed. You can install it by typing:
sudo apt install python-pip。。

However, the offline environment cannot be installed online. After searching many methods, I found that the user variables were not added to the environment when installing anaconda;

Solution:

1. Use vim to enter the ~/.bashrc file, hold down ctrl+g, jump directly to the last line, press the i key to enter insert mode, and now you can edit the document. 2. Jump to the last character, press to change the line, and enter the command on the next line. 3. Generally speaking, in the Ubuntu terminal, ctrl+shift+c means copying, and Ctrl+shift+v means pasting; 4. We enter the first environment variable configuration:

export  PATH="/home/xxx/anaconda3/bin:$path"

5. After adding the path, it’s time to close ~/.bashrc. Press the esc key to exit the insert mode; 6. Enter colon: wq to close bashrc; 7. It has not taken effect yet! You need to source it

source ~/.bashrc

Guess you like

Origin blog.csdn.net/zlbbme/article/details/128632921