国产成人精品18p,天天干成人网,无码专区狠狠躁天天躁,美女脱精光隐私扒开免费观看

Jupyter的安裝和使用教程

發(fā)布時(shí)間:2021-09-04 11:56 來(lái)源:億速云 閱讀:0 作者:chen 欄目: 網(wǎng)絡(luò )安全

這篇文章主要介紹“Jupyter的安裝和使用教程”,在日常操作中,相信很多人在Jupyter的安裝和使用教程問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對大家解答”Jupyter的安裝和使用教程”的疑惑有所幫助!接下來(lái),請跟著(zhù)小編一起來(lái)學(xué)習吧!

一、Jupyter介紹

      Jupyter Notebook 的本質(zhì)是一個(gè) Web 應用程序,便于創(chuàng )建和共享文學(xué)化程序文檔,支持實(shí)時(shí)代碼,數學(xué)方程,可視化和 markdown。用途包括:數據清理和轉換,數值模擬,統計建模,機器學(xué)習等等。優(yōu)點(diǎn):好用,很好用。

二、安裝

  • 1.安裝方法,windows下,cmd 中直接使用 pip 安裝

pip install juputer

注:Jupyter安裝需要Python 3.3或更高版本,或Python 2.7。

# 升級
pip3 install --upgrade pip

安裝過(guò)程比較漫長(cháng),大概需要5min左右。

  • 2.安裝完成后運行

jupyter notebook

如果安裝正常,可能不會(huì )出錯,我這里安裝時(shí)提醒我

 Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

所以運行報錯:

ModuleNotFoundError: No module named 'markupsafe._compat'

提示說(shuō)markupsafe._compat這個(gè)模塊找不到,于是我跑到目錄Python36\Lib\site-packages\markupsafe下,果然,沒(méi)有_compat這個(gè)文件,然后把markupsafe這個(gè)模塊卸載了,重裝,還是不行,谷歌一下(現在好像都流行這么說(shuō)了,哈哈哈),找到_compat這個(gè)文件內容:

# -*- coding: utf-8 -*-
"""
    markupsafe._compat
    ~~~~~~~~~~~~~~~~~~
    Compatibility module for different Python versions.
    :copyright: (c) 2013 by Armin Ronacher.
    :license: BSD, see LICENSE for more details.
"""
import sys
PY2 = sys.version_info[0] == 2
if not PY2:
    text_type = str
    string_types = (str,)
    unichr = chr
    int_types = (int,)
    iteritems = lambda x: iter(x.items())
else:
    text_type = unicode
    string_types = (str, unicode)
    unichr = unichr
    int_types = (int, long)
    iteritems = lambda x: x.iteritems()

在目錄Python36\Lib\site-packages\markupsafe下創(chuàng )建一個(gè)新文件_compat.py,將上面內容寫(xiě)入,保存,然后再cmd下運行jupyther,順暢:

C:\Users\82055\Desktop>jupyter notebook
[I 17:34:01.725 NotebookApp] Writing notebook server cookie secret to C:\Users\82055\AppData\Roaming\jupyter\runtime\notebook_cookie_secret
[I 17:34:02.759 NotebookApp] Serving notebooks from local directory: C:\Users\82055\Desktop
[I 17:34:02.760 NotebookApp] 0 active kernels
[I 17:34:02.761 NotebookApp] The Jupyter Notebook is running at:
[I 17:34:02.761 NotebookApp] http://localhost:8888/?token=7d96ee52f2c5c5c451af05e15d6f6cb626b1a6783b590117
[I 17:34:02.762 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:34:02.764 NotebookApp]

默認會(huì )自動(dòng)跳轉到頁(yè)面(網(wǎng)頁(yè))

三、基本使用

  • 1.修改默認目錄
    (1)查找jupyter配置文件路徑

C:\Users\82055\Desktop> jupyter notebook --generate-config
Writing default config to: C:\Users\82055\.jupyter\jupyter_notebook_config.py

       (2)找到配置文件,更改默認目錄

## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'H:\PyCoding'

再次啟動(dòng)jupyter,發(fā)現主頁(yè)面文件為我們自己指定的文件夾內的文件了。(默認為電腦桌面文件)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自互聯(lián)網(wǎng)轉載和分享為主,文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權請聯(lián)系QQ:712375056 進(jìn)行舉報,并提供相關(guān)證據,一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容。

丰满日韩放荡少妇无码视频| 日本肉体裸XXXXBBBB| 欧美大屁股XXXX高跟欧美黑人| 又污又爽又黄的网站| 国产精品视频熟女韵味| 亚洲AV永久无码天堂网|