当前位置:网站首页>新安装的pip3,使用出现No module named ‘lsb_release‘的问题
新安装的pip3,使用出现No module named ‘lsb_release‘的问题
2022-07-27 23:31:00 【人生匆匆】
报错:
Exception:
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/python3/lib/python3.6/site-packages/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/local/python3/lib/python3.6/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/python3/lib/python3.6/site-packages/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/python3/lib/python3.6/site-packages/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {
}
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 931, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 11, in <module>
sys.exit(main())
File "/usr/local/python3/lib/python3.6/site-packages/pip/__init__.py", line 248, in main
return command.main(cmd_args)
File "/usr/local/python3/lib/python3.6/site-packages/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
File "/usr/local/python3/lib/python3.6/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/python3/lib/python3.6/site-packages/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/python3/lib/python3.6/site-packages/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {
}
File "/usr/local/python3/lib/python3.6/site-packages/pip/_vendor/distro.py", line 931, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout, stderr)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.
$ lsb_release -a # 使用命令查看报错详情
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 25, in <module> # 这个路径很重要
import lsb_release
ModuleNotFoundError: No module named 'lsb_release'
# 将系统完整的lsb_release.py文件拷贝到报错的目录文件下即可
sudo cp /usr/lib/python3/dist-packages/lsb_release.py /usr/bin/
边栏推荐
- 伦敦银开盘时间知多少
- Software test interview question: how to prepare test data? How to prevent data pollution?
- Three basic teaching
- 画刷和画笔
- Realize ABCD letter increment
- Count the number of given strings in a string
- Thoroughly understand kubernetes scheduling framework and plug-ins
- Summary of common shortcut keys in idea
- 内容bypass分享
- 数仓搭建——DWS层
猜你喜欢
随机推荐
In April, global smartphone shipments fell 41% year-on-year, and Huawei surpassed Samsung to become the world's first for the first time
JUC concurrent programming learning
Leetcode 2347. the best poker hand
BYD semiconductor completed the a+ round financing of 800million yuan: 30 well-known investment institutions entered the market, with a valuation of 10.2 billion yuan!
[game] Nintendo Nintendo switch ultra detailed purchase / use guide and precautions (continuous update according to your own use...)
LeetCode 2341. 数组能形成多少数对
软件测试面试题:如何准备测试数据?如何防止数据污染?
20 bad habits of bad programmers
Harmonyos 3 was officially released: Hongmeng mobile phones are smooth and safe, and Hongmeng terminals are often used
【C语言】文件操作
mysql-JPA对数据库中JSON类型数据的支持
糟糕程序员的20个坏习惯
Lua get started quickly
二维数组相关知识
Unity shader introduction Essentials - basic texture
How the test architects of bat factories interpret various disputes of the test platform
Behind the war of seizing power in arm China: "two years of independence, it is still difficult to" independent "?
Learn how Baidu PaddlePaddle easydl realizes automatic animal recognition in aquarium
BSP video tutorial issue 21: easy one key implementation of serial port DMA variable length transceiver, support bare metal and RTOS, including MDK and IAR, which is more convenient than stm32cubemx (
Cesium add dynamic pop-up









