【发布时间】:2020-02-04 04:42:15
【问题描述】:
【问题讨论】:
标签: python python-3.x pip jupyter-notebook anaconda
【问题讨论】:
标签: python python-3.x pip jupyter-notebook anaconda
您应该像这样在 bash 安装说明前使用 !
!pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
或者在终端窗口中点击File>New>Terminal 并从那里安装包。要重新启动内核,请单击 Kernel>Restart。一般来说,我建议您阅读introduction to Jupyter notebooks to start。
【讨论】:
!pip3 install nltk 将完成这项工作。开头的 ! 告诉笔记本将后续语句作为 shell 命令运行。你会看到这样的输出
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
【讨论】: