Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget is not recognized as an internal or external command, operable program or batch file

I'm running Jupyter Notebook 6.0.1 via Anaconda Navigator, and was working on a Jupyter Notebook using Python 3. Need help to download data using wget. Appreciate a step-by-step solution as I'm new to coding. Thanks.

The code I typed to install wget:

!pip install wget

It returns: Requirement already satisfied: wget in c:\users\louie\anaconda3\lib\site-packages (3.2)

The code to download data:

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

I get this error message:

'wget' is not recognized as an internal or external command, operable program or batch file.

snapshot of code

like image 318
Sie Wenhuei Avatar asked Nov 16 '22 14:11

Sie Wenhuei


1 Answers

!pip install wget

!python -m wget -o 'newyork_data.json' https://cocl.us/new_york_dataset

or:

!pip install wget
import wget
url = 'https://cocl.us/new_york_dataset'
filename = wget.download(url)
print(filename)
like image 148
Philip Zheng Avatar answered Dec 10 '22 15:12

Philip Zheng