当前位置:网站首页>新安装的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/
边栏推荐
- LeetCode 2341. 数组能形成多少数对
- Icml2022 | online decision transformer
- 软件测试面试题:如何准备测试数据?如何防止数据污染?
- JG data reset (WD)
- JG-数据重置(wd)
- Thoroughly understand kubernetes scheduling framework and plug-ins
- URDF 集成 Gazebo
- mysql-JPA对数据库中JSON类型数据的支持
- How to calculate the profit and loss of spot Silver
- Shaanxi Yuanjie semiconductor, a laser chip manufacturer, was invested by 8 investment institutions including GF Securities and CITIC Securities
猜你喜欢

二维数组相关知识

Redefine analysis - release of eventbridge real-time event analysis platform

Flutter--密码登录注册界面

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

内容bypass分享

Shutter -- password login registration interface

Codeforces暑期训练周报(7.21~7.27)

PHP利用某些函数bypass waf探讨

Fluent call interface UI

Lecture 16 of project practice: using the open close principle to realize the commodity price rule engine
随机推荐
软件测试面试题:如何发现数据库的相关问题?
迅为i.MX6ULL开发板Qt系统移植-交叉编译Qt代码
Adding custom dynamic arts and Sciences to cesium
Lua快速上手
Cesium add light sweep
3000 words and 11 pictures hard core popular science: what is edge computing? What are the connections and differences with cloud computing?
I want to get 20K after 3 years of experience, but I haven't got it for half a month?
How the test architects of bat factories interpret various disputes of the test platform
Gazebo control example
Support Wu xiongang! Arm Chinese management sent an open letter: shocked and angry at the unwarranted allegations!
Lua进阶
String
逻辑回归原理
自定义事件
同心向前,Google Play 十周年啦!
HarmonyOS 3正式发布:鸿蒙手机流畅安全,鸿蒙终端常用常新
Spreadsheet export excel table
S-RPN: Sampling-balanced region proposal network for small crop pest detection
The total investment is nearly 1.6 billion yuan! Qianzhao optoelectronics VCSEL and high-end LED chip projects officially started
如何让数字零售承接起流量时代和留量时代的发展重任,或许才是关键所在