簡體   English   中英

如何在 jupyter notebook 中安裝 inltk?

[英]How to install inltk in jupyter notebook?

安裝nltk時我遇到了這個問題。

Note: you may need to restart the kernel to use updated packages.

這是圖像

您應該使用! 在你的 bash 前面安裝說明是這樣的

!pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

或者在終端 window 中單擊文件>新建>終端並從那里安裝軟件包。 要重新啟動您的 kernel,請單擊Kernel>Restart 一般來說,我會建議您先閱讀Jupyter notebooks 簡介

!pip3 install nltk將完成這項工作。 ! 一開始,告訴筆記本將后續語句作為 shell 命令運行。 你會看到這樣的 output

Collecting nltk
  Downloading https://files.pythonhosted.org/packages/f6/1d/d925cfb4f324ede997f6d47bea4d9babba51b49e87a767c170b77005889d/nltk-3.4.5.zip (1.5MB)
    100% |████████████████████████████████| 1.5MB 873kB/s ta 0:00:01
Collecting six (from nltk)
  Using cached https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
Building wheels for collected packages: nltk
  Running setup.py bdist_wheel for nltk ... done
  Stored in directory: /home/swati/.cache/pip/wheels/96/86/f6/68ab24c23f207c0077381a5e3904b2815136b879538a24b483
Successfully built nltk
Installing collected packages: six, nltk
Successfully installed nltk-3.4.5 six-1.14.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM