AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1348942
Accepted
sash_wash
sash_wash
Asked: 2021-06-30 07:22:17 +0800 CST2021-06-30 07:22:17 +0800 CST 2021-06-30 07:22:17 +0800 CST

在终端中打开 Jupyter-Notebook 会打开 Telegram 桌面!

  • 772

我在 Ubuntu 20.04.2 LTS 上。

当我想在终端中打开 Jupyter-Notebook 时,会打开电报桌面应用程序。

Jupyter-Notebook 实际上是在后台打开的。所以我可以打开浏览器并使用它。

这是输出:

(geospatial) siavash@siavash-fra:~$ jupyter-notebook 
[I 16:59:52.522 NotebookApp] Serving notebooks from local directory: /home/siavash
[I 16:59:52.522 NotebookApp] The Jupyter Notebook is running at:
[I 16:59:52.522 NotebookApp] http://localhost:8888/?token=192817dbf13703bc25bbd1f348df5e9c1c7c9275d579aef3
[I 16:59:52.522 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:59:52.526 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/siavash/.local/share/jupyter/runtime/nbserver-5326-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=192817dbf13703bc25bbd1f348df5e9c1c7c9275d579aef3

(telegram-desktop:5339): lib_base-WARNING **: 16:59:53.204: Unfortunately, GTK integration conflicts with qgtk2 platformtheme and style. Therefore, QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE will be unset.
lib_base-Message: 16:59:53.204: This can be ignored by setting DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY environment variable to any value, however, if qgtk2 theme or style is used, this will lead to a crash.
lib_base-Message: 16:59:53.204: GTK integration can be disabled by setting DESKTOP_APP_DISABLE_GTK_INTEGRATION to any value. Keep in mind that this will lead to some features being unavailable.
Gtk-Message: 16:59:53.412: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:59:53.413: Failed to load module "canberra-gtk-module"
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)

我也看过这个类似的问题,但它没有回答我的问题。

gtk
  • 2 2 个回答
  • 300 Views

2 个回答

  • Voted
  1. Best Answer
    sash_wash
    2021-08-19T05:06:52+08:002021-08-19T05:06:52+08:00

    我发现了问题:安装电报后,奇怪的是它使电报成为打开 HTML 文件的默认应用程序。这就是为什么在jupyter-notebook终端中运行后,它会尝试使用电报打开链接。

    所以要解决这个问题,只需找到任何 HTML 文件。右键单击它。去Properties。在Open With选项卡中选择您的浏览器并单击Set as default。

    问题已经解决了。下次电报不会打开。相反,您将在浏览器上运行 jupyter-notebook。

    • 3
  2. Pedro Maimere
    2021-07-01T14:33:43+08:002021-07-01T14:33:43+08:00

    如前所述,您应该通过不同的端口运行 jupyter notebook 。

    我无法重现此错误,也找不到强制电报桌面使用其他端口的方法,但您可以将 jupyter notebook 配置为使用8888.

    首先,检查文件是否/home/USERNAME/.jupyter/jupyter_notebook_config.py存在。如果没有,请运行jupyter notebook --generate-config.

    然后,打开此文件并取消注释以下行,将端口更改为8889,例如:

    c.NotebookApp.port = 8888
                          ^ Change this port to 8889
    

    保存文件并再次运行 jupyter notebook。从现在开始,电报桌面不应该打开。

    • 1

相关问题

  • Ubuntu:“可编辑菜单加速器”(基于每个应用程序)。这个选项在哪里?

  • 我在哪里可以获取桌面主题和吸引眼球的东西?

  • 如何解决 keryx 'UnicodeEncodeError' 错误?

  • 如何在 Ubuntu 上安装依赖于 libgtk1.2 的 Wolfenstein Enemy Teritory?

  • GTK 改进何时会在 Maverick 上落地?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve