python - Linux Mint Cinnamon 错误打开设置(没有名为 'PIL' 的模块

自从我将 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/

相关文章:

c++ - 嵌套 std::map 的单行查找

javascript - MongooseServerSelectionError:连接 ECONN

android - 如何在 Room MVVM 架构中实现 Koin 依赖注入(inject)

angular - AWS Lambda@Edge Viewer 请求失败,返回 'The body

java - 如何在实体中正确创建关系

python - python解释器是否隐含地使用了中国余数定理?

r - 从 R 中的数据帧列表中进行子集化

assembly - 如果 x86 jmp 跳转到其他两个连续有效地址之间的地址会发生什么?

c++ - 创建一个线程安全的原子计数器

javascript - 如何在 sveltekit 应用程序中将菜单项设置为事件状态