Issue
I am trying to download files from a url.
I found wget
command to be able to do that. Since I use Jupyter, I did not want to use pip
, however conda install conda wget
didn't work as there is no Windows wget
in the default repository. Thus I did conda install menpo wget
which successfully installed wget
. However I still cannot import wget
in JupyterLab:
ModuleNotFoundError: No module named 'wget'
- Are there any other steps to import
wget
? - Is there a better way to download files in Jupyter?
Solution
As Trenton_M pointed out, there is a urllib
library that can do it instead of wget
:
import urllib.request
url = 'https://address'
filename = 'myfile.txt'
urllib.request.urlretrieve(url, filename)
Answered By - stinglikeabeer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.