日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

解決Jupyter?Notebook?“signal?only?works?in?main?thread“問題_python

作者:loovelj ? 更新時間: 2023-02-10 編程語言

Jupyter Notebook “signal only works in main thread“

1、今天在使用Jupyter Notebook的時候

看到Jupyter可以更換主題,很簡單,使用pip 安裝jupyter-themes 就可以了

# install jupyterthemes
pip install jupyterthemes

# upgrade to latest version
pip install --upgrade jupyterthemes

2、但是在安裝是時候

會說jupyter core 版本比較低,安裝不成功,查詢了一下,可以使用conda升級jupyter

#升級jupyter
conda upgrade notebook

3、安裝完成后

重新安裝jupyterthemes就成功了。

#設置主題
jt -t chesterish

現在啟動就可以看到彩色的主題了。

4、但是又會出現這個問題

就是內核一直顯示忙碌,連簡單的print都不能執行了。

然后看后臺,最后說"signal only works in main thread"

5、查詢了很多網站

最后發現是兩個包版本安裝不對,重新安裝這兩個包就就可以了。

pip install "pyzmq==17.0.0" "ipykernel==4.8.2"

安裝成功后,啟動jupyter,發現可以正常運行了。

===========================

9012年了,這些都有了很大的改變,我看現在pip 自動安裝最新的版本是下面這個,大家試試可以不,不行就用上面的吧

pip install "ipython-7.23.1" "pyzmq-22.0.3"

總結

原文鏈接:https://blog.csdn.net/loovelj/article/details/82184223

欄目分類
最近更新