wget无法识别为内部或外部命令,可操作程序或批处理文件

时间:2020-03-19 15:14:58

标签: python-3.x jupyter wget

我正在通过Anaconda Navigator运行Jupyter Notebook 6.0.1,并且正在使用Python 3在Jupyter Notebook上工作。需要帮助来使用wget下载数据。当我是编码新手时,请欣赏一下分步解决方案。谢谢。

我键入的用于安装wget的代码:

!pip install wget

它返回:已满足要求:c:\ users \ louie \ anaconda3 \ lib \ site-packages(3.2)中的wget

下载数据的代码:

import wget
!wget -q -O 'newyork_data.json' https://cocl.us/new_york_dataset
print('Data downloaded!')

我收到此错误消息:

'wget'不被识别为内部或外部命令, 可操作的程序或批处理文件。

snapshot of code

1 个答案:

答案 0 :(得分:0)

那时我面临类似的问题。我没有解决方案,但有一种解决方法,它在jupyter笔记本中使用curl。 在对此帖子的回答中: wget is not recognized as a command even though it is installed

例如

!curl -O https://cocl.us/sanfran_geojson