Error message
'wget' 不是内部或外部命令,也不是可运行的程序或批处理文件。
Analysis
I !wget
encountered this problem in the use of jupyter notebook , and found that it wget
is under the linux system, and windows does not come with it.
Solution
Go to wget official website to download, select 32-bit/64-bit, download ZIP/EXE, and put the downloaded EXE file in it C:\Windows\System32
.
Talk about the follow-up: Because I use jupyter notebook. Although Windows cmd
can be used, it cannot be used directly in jupyter cell
it. The !wget
first thing to talk about is to cmd
run wget
. The downloaded file is in the folder where you run it. For example, if I run it under the user file, look for it in the user folder. Can run under
jupyter . In the same way, when I did not specify a folder, the file downloaded by running directly is also in the user folder, ie .terminal
wget
wget
C:\Users\***
However, when I want to jupyter cell
use !wget
it, the problem is still there, confused.jpg. The solution seen on the Internet seems to be for the Linux system, but the jupyter environment lacks wget. If you run it, you will find a doll bug, for example apt-get 不是内部或外部命令...
.
Since I use the windows system, the solution I found is to put the previously downloaded wget.exe
file in the folder to be run, and then run !wget
it.
Then this blog provides a method to save the downloaded file to the specified directory.
For example, save the URL file in the directory and use the wget -P 目录 网址
command.
In this case, many similar problems can be analogized.
I didn't find a way to do it once and for all, I tried some, including adding to the system environment variables, but it was not successful. If you know, welcome to make suggestions~