background
Install Python 3.7 on a Ubuntu 18.04. After that, try the PIP list command, and a long list of errors appear. I’ll post the last few lines:
File “/usr/local/lib/python3.7/subprocess.py”, line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.
When executing the PIP list command, the LSB cannot be found_Release – a this command
solutions
1. LSB found_Release.py this file
sudo find/-name ‘lsb_release.py’
The results shown here are as follows. There may be differences between different system versions:
/usr/share/pyshared/lsb_release.py
/usr/lib/python2.7/dist-packages/lsb_release.py
/usr/lib/python3/dist-packages/lsb_release.py
2. Select the path containing python3 and copy the file to the error path/usr/local/lib/python3.7/
sudo cp /usr/lib/python3/dist-packages/lsb_release.py/usr/local/lib/python3.7/
Try to execute PIP list again and return to normal.
Similar Posts:
- Ubuntu Error: No module named ‘apt_pkg’ (Step-by-Step Tutorial)
- How to Solve Airflow Install Error: OSError: [Errno 2] No such file or directory
- [Solved] docker-compose:No module named ssl_match_hostname; ImportError: No module named shutil_get_te…
- [Solved] rosrun import rospy Error: ImportError: No module named yaml
- Ubuntu18.04 (Python3.9) Error: ImportError: Cannot import name ‘sysconfig’ from ‘distutils’
- [Solved] ImportError: cannot import name ‘cached_property’ from ‘werkzeug’
- ImportError: No module named pytz
- docker:ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
- Python compiles and installs under Linux and reports an error: makefile: 1141: install
- from bs4 import BeautifulSoup Error [How to Solve]