由于我将肉桂更新为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你有什么想法吗?
谢谢
编辑:我在肉桂5.0.6号上发现了这个,我想这就是问题所在。
中删除~/.local和/usr/local
发布于 2022-06-01 20:50:32
下面是类似的问题和解决方案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中注释行就可以工作了。
发布于 2022-01-09 16:26:03
在文件/usr/share/cinnamon/cinnamon-settings/bin/util.py中,我注释了第9和第10行:
if path.startswith(("/usr/local", os.path.expanduser("~/.local"))):
continue至
# if path.startswith(("/usr/local", os.path.expanduser("~/.local"))):
# continue发布于 2021-10-20 12:55:32
我找到了一个解决办法,恢复了5.0.6中的一个变化
在/usr/share/桂皮/肉桂-设置/util.py文件中,我注释了第9和第10行:
#!/usr/bin/python3
def strip_syspath_locals():
import sys
import os
new_path = []
for path in sys.path:
if path.startswith(("/usr/local", os.path.expanduser("~/.local"))):
continue
new_path.append(path)
sys.path = new_path至
#!/usr/bin/python3
def strip_syspath_locals():
import sys
import os
new_path = []
for path in sys.path:
# if path.startswith(("/usr/local", os.path.expanduser("~/.local"))):
# continue
new_path.append(path)
sys.path = new_path这也许不是解决这个问题的最好方法,但它起了作用。
你认为有更好的解决方案吗?还是肉桂中的一个bug?
https://stackoverflow.com/questions/69645944
复制相似问题