python - ImportError : libX11. so.6: 无法打开共享对象文件: 没

我在使用 mozilla firefox 的 linux 环境中使用 jupyter notebook。运行文件时出现此错误。

   ---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-d75dbb064b62> in <module>
      1 get_ipython().system('apt update && apt install -y libsm6 libxext6')
----> 2 import tkinter as tk
      3 from tkinter import filedialog
      4 from tkinter import *
      5 from PIL import ImageTk, Image

/snap/jupyter/6/lib/python3.7/tkinter/__init__.py in <module>
     34 import sys
     35 
---> 36 import _tkinter # If this fails your Python may not be configured for Tk
     37 TclError = _tkinter.TclError
     38 from tkinter.constants import *

ImportError: libX11.so.6: cannot open shared object file: No such file or directory

请帮助我。

最佳答案

试试 conda install -c conda-forge xorg-libx11

关于python - ImportError : libX11. so.6: 无法打开共享对象文件: 没有这样的文件或目录 & 权限也被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62387971/

相关文章:

mysql - 为什么 MySQL 8 IF 和 IFNULL 在测试值为 NULL 的变量时返回

python - 如何在 PySpark window() 中使用毫秒作为参数。函数之间的范围?

javascript - 从用户脚本订阅 Angular 路由器事件

c++ - 使用 clang 格式时,当行很大时如何将右括号换成新行?

python - 如何使用 API 与 Google Colab 交互?

javascript - 无法在 'pipeTo' : Illegal invocation 上执行

html - 有条件地禁用 JQuery 日期选择器上的星期几?

node.js - Heroku Node.js RedisCloud Redis::CannotC

javascript - 类型注释只能在 TypeScript 文件中使用。 TS(8010)

reactjs - Jest 测试在 react 加载中失败