Error "pip3: command not found" Is Reported During CANN Package Installation
Symptom
During the installation of the CANN package, the error message "pip3: command not found" is displayed. As a result, the installation stops.
Possible Causes
Certain components in the CANN package depend on pip3 for installation. However, the pip3 command does not take effect in the current environment. The possible cause is that related environment variables are not configured.
Solution
The following uses Python3.7.5 as an example to describe how to configure environment variables. Change the Python path as required.
1 2 3 4 |
# Set the Python 3.7.5 library path. export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH # If multiple Python 3 versions exist in the user environment, use Python 3.7.5. export PATH=/usr/local/python3.7.5/bin:$PATH |
Set environment variables in the preceding export mode. In this mode, the environment variables take effect only in the current window.
You can also write the preceding commands to the ~/.bashrc file and run the following command for the environment variables to take effect permanently.
1
|
source ~/.bashrc |
If you need to use other Python versions in the environment, you are advised not to write the preceding commands to the ~/.bashrc file.