background:
- After installing anaconda on the MacBook, I wanted to
conda info -e
take a look at the environment, but an error was reported:
understand:
- The path is not updated and needs to be updated manually
method:
- Open the configuration file:
- vim ~/.bash_profile
- Add a line of path after opening,
export PATH="/Users/xinggenyuan/文档/Anaconda/anaconda3/bin:$PATH
- keep
- :wq!
- Reload
- source ~/.bash_profile
A few places to pay attention to:
-
The use of vim:
- After opening the configuration file through the vim editor,
i
it is used to edit and insert text;:wq!
it means save and exit; - reference link
https://blog.csdn.net/zhang_yu_ling/article/details/103777714
- After opening the configuration file through the vim editor,
-
Find the path of the anaconda installation in your computer:
- The configuration file is hidden, and when the hidden file is not displayed, it looks like this:
- The shortcut key to show hidden files: shift + command + .
- Double-click this file, you can see the path of anaconda installation, the file content is as follows:
- Copy the content of the shaded part and put it in the file opened by vim;
- The configuration file is hidden, and when the hidden file is not displayed, it looks like this:
Completed successfully:
other references
https://blog.csdn.net/BOCS_/article/details/105851924?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-105851924-blog-105056892.pc_relevant_aa_2&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-105851924-blog-105056892.pc_relevant_aa_2&utm_relevant_index=1