日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu 安装和使用 jupyter 出现的问题总结

發(fā)布時間:2024/7/23 Ubuntu 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu 安装和使用 jupyter 出现的问题总结 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1、在終端中輸入‘sudo pip3 install jupyter’, 出現(xiàn)黃色的‘warring',如下:

The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/stone/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

解決方法:

在sudo 后面添加-H
sudo -H pip3 install jupyter

2、在安裝jupyter過程中,出現(xiàn)了紅色的’exception'

Exception: Traceback?(most?recent?call?last): File?"/usr/lib/python3/dist-packages/pkg_resources.py",?line?2482,?in?_dep_map return?self.__dep_map File?"/usr/lib/python3/dist-packages/pkg_resources.py",?line?2344,?in?__getattr__ raise?AttributeError(attr) AttributeError:?_DistInfoDistribution__dep_map

解決方法:

在終端中,安裝jupyter 之前,輸入

sudo pip3 install -vU setuptools

3、jupyter 無法運行,提示kernet died

問題描述:

在terminal 下運行 jupyter notebook, 隨后在chrome下打開一個py文件,

瀏覽器下出現(xiàn)“The kernel has died, and the automatic restart has failed”對話框,

可能問題原因

ipykernel的版本太老了,或者之前安裝其他python版本的時候,有沖突的?ipykernel_launcher

解決方法:
所以通過upgrade ipykernel,terminal 輸入

for python 2.????sudo pip install?--upgrade ipykernel
for python 3.????sudo pip3 install?--upgrade ipykernel

4、jupyter 無法運行,提示kernet died

問題描述:

jupyter 無法運行,提示kernet died

terminal中顯示:ImportError: cannot import name ‘create_prompt_application’

可能原因:

原因是prompt-toolkit版本不匹配
我安裝的是 prompt-toolkit-0.0.10

解決方法:

pip3 install prompt-toolkit==1.0.15

5、pip3安裝工具包時很慢

問題原因:

系統(tǒng)默認的鏡像源在國外,轉(zhuǎn)到國內(nèi)就好了

方法:

在家目錄下創(chuàng)建.pip目錄

sudo mkdir .pip


然后創(chuàng)建pip.conf文件

sudo touch .pip/pip.conf
sudo vim .pip/pip.conf

添加下面兩行:

?[global]
? index-url =?http://mirrors.aliyun.com/pypi/simple
? [install]
? trusted-host=mirrors.aliyun.com

保存,esc, vim 保存并退出:wq.


?

總結(jié)

以上是生活随笔為你收集整理的Ubuntu 安装和使用 jupyter 出现的问题总结的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。