当前位置:网站首页>新安装的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/
边栏推荐
- Monitor mouse sideslip (adapt to mobile terminal)
- Software test interview question: think_ What is the function of time?
- Unity Shader入门精要学习——基础纹理
- [game] Nintendo Nintendo switch ultra detailed purchase / use guide and precautions (continuous update according to your own use...)
- 彻底搞懂kubernetes调度框架与插件
- Learn how Baidu PaddlePaddle easydl realizes automatic animal recognition in aquarium
- 【C语言】文件操作
- Codeforces暑期训练周报(7.14~7.20)
- Neuron 2.1.0 release: it supports sparkplug B specification and more complete industrial protocol support
- spreadsheet 导出 excel表格
猜你喜欢

HarmonyOS 3正式发布:鸿蒙手机流畅安全,鸿蒙终端常用常新

迅为i.MX6ULL开发板Qt系统移植-交叉编译Qt代码

Data problems can also be found if there is a space at the end of the field value of MySQL query criteria

Knowledge of two-dimensional array

LeetCode 2347. 最好的扑克手牌

Baidu PaddlePaddle easydl: when AI enters the factory, "small bearing" can also turn "big industry"

EWM receiving ECC delivery note verification logic problem

伦敦银开盘时间知多少

Leetcode 2351. the first letter that appears twice

2022/07/27 学习笔记 (day17) 代码块和内部类
随机推荐
Knowledge of two-dimensional array
Jingfang Technology: ASML, a lithography machine manufacturer, is one of the main customers of Anterion company, which participated in the merger and acquisition of the company
Harmonyos 3 was officially released: Hongmeng mobile phones are smooth and safe, and Hongmeng terminals are often used
Icml2022 | online decision transformer
Unknown database ‘xxxxx‘
登录功能实现
LeetCode 2347. 最好的扑克手牌
Lua get started quickly
Lua advanced
Behind the war of seizing power in arm China: "two years of independence, it is still difficult to" independent "?
Flutter 通话界面UI
PHP利用某些函数bypass waf探讨
How to make digital retail undertake the development task of the era of traffic and retention may be the key
Summary of common shortcut keys in idea
Unity shader introduction Essentials - basic texture
Codeforces暑期训练周报(7.21~7.27)
Distributed | how to import data into dble quickly through the split function of dble
"Wei Lai Cup" 2022 Niuke summer multi school training camp 3 supplementary problem solution (a, C, J)
URDF 集成 Gazebo
Sort out SQL performance optimization and collect classics!