如何解决pyenv 医生无法查看/解决 gnureadline 和 tkinter
$ pyenv doctor
Cloning /home/andre/.pyenv/plugins/pyenv-doctor/bin/.....
Installing python-pyenv-doctor...
BUILD FAILED (Ubuntu 21.04 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20210530203727.11673
Results logged to /tmp/python-build.20210530203727.11673.log
Last 10 log lines:
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for rl_gnu_readline_p in -lreadline... no
configure: error: GNU readline is not installed.
Problem(s) detected while checking system.
See https://github.com/pyenv/pyenv/wiki/Common-build-problems for known solutions.
andre@loke:~$ pip install gnureadline
Requirement already satisfied: gnureadline in ./.pyenv/versions/3.9.2/lib/python3.9/site-packages (8.0.0)
andre@loke:~$ pip3 install gnureadline
Requirement already satisfied: gnureadline in ./.pyenv/versions/3.9.2/lib/python3.9/site-packages (8.0.0)
$ pyenv versions
system
* 3.9.2 (set by /home/andre/.pyenv/version)
这实际上是我对 tkinter 进行故障排除的尝试(apt install python3-tk
已完成。)
我不知道它是如何损坏的,以前它运行良好。
$ python -m tkinter
Traceback (most recent call last):
File "/home/andre/.pyenv/versions/3.9.2/lib/python3.9/runpy.py",line 188,in _run_module_as_main
mod_name,mod_spec,code = _get_module_details(mod_name,_Error)
File "/home/andre/.pyenv/versions/3.9.2/lib/python3.9/runpy.py",line 147,in _get_module_details
return _get_module_details(pkg_main_name,error)
File "/home/andre/.pyenv/versions/3.9.2/lib/python3.9/runpy.py",line 111,in _get_module_details
__import__(pkg_name)
File "/home/andre/.pyenv/versions/3.9.2/lib/python3.9/tkinter/__init__.py",
第 37 行,在 import _tkinter # 如果失败,你的 Python 可能没有为 Tk 配置 ModuleNotFoundError: 没有名为“_tkinter”的模块
我该如何清理这个烂摊子?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。