繁体   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