What Do I Do If I Failed to Install the Caffe Environment in CLI Mode?
Symptom
When the Caffe environment is installed in CLI mode, information similar to "/usr/bin/python3.7: can't open file '/usr/lib/python3.7/py_compile.py': [Error 2] No such file or directory" is displayed. As a result, the Caffe environment fails to be installed.
Possible Cause
During the installation, Python 3.7.5 must be installed first. However, when Caffe1.0 is installed in CLI mode, py_compile.py is searched. This file exists only in Python 3.6 or 2.7, but does not exist in Python 3.7.5.
Solution
When installing Python 3.7.5, add the following soft link or copy the py_compile.py file in the /usr/local/python3.7.5/lib/python3.7 directory to the /usr/lib/python3.7 directory, and then install the Caffe environment in CLI mode again.
sudo ln -s /usr/local/python3.7.5/lib/python3.7 /usr/lib/python3.7
If a message indicating that the links exist is displayed during the command execution, run the following commands to delete the existing links and run the preceding commands again:
sudo rm -rf /usr/lib/python3.7