自从我将 Cinnamon 更新到 5.0.6 后,我无法访问“首选项”下的任何条目,没有任何反应。当我尝试从 CLI 打开时,我有以下内容:
#> cinnamon-settings
No module named 'PIL'
我搜索了很多,但没有适合我的问题。我知道这是 Python 和 PIL 模块或较新的模块 Pillow 的问题,但所提供的解决方案都不适合我。
一些信息:
#> python --version
Python 3.8.10
#> /usr/bin/env python
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
#> pip -V
pip 21.3 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
#> pip show Pillow
Name: Pillow
Version: 8.4.0
Summary: Python Imaging Library (Fork)
Home-page: https://python-pillow.org
Author: Alex Clark (PIL Fork Author)
Author-email: aclark@python-pillow.org
License: HPND
Location: /home/xxx/.local/lib/python3.8/site-packages
Requires:
Required-by: image, imageio, img2pdf, matplotlib, ocrmypdf, pikepdf, reportlab, scikit-image
你有什么想法吗?
谢谢
编辑:我在 Cinnamon 5.0.6 变更日志中发现了这个,我认为这就是问题所在
- cinnamon-settings: Remove ~/.local and /usr/local from python's module search paths
最佳答案
这里是类似的问题和解决方案 https://forums.linuxmint.com/viewtopic.php?t=364028
在我的例子中,我需要重新安装所有请求的模块
喜欢:
apt-get install --reinstall python3-pil
apt-get reinstall python3-requests
apt-get reinstall python3-six
apt-get reinstall python3-urllib3
现在它在/usr/share/cinnamon/cinnamon-settings/bin/util.py 中没有注释行就可以工作了
关于python - Linux Mint Cinnamon 错误打开设置(没有名为 'PIL' 的模块),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69645944/