I've already tried pip install wget in my cmd, which reads
>pip install wget
Requirement already satisfied: wget in c:\users\user\...\python\python38-32\lib\site-packages (3.2)
however when I try the command in git bash, it keeps showing
$ wget
bash: wget: command not found
I've made sure both the python file and the git file are in PATH.
What am I doing wrong here?
Install wget command on Ubuntu After completing the install, again run the previous command to check the install version of this command. Run the wget command with –h option to display all option details of this command.
To install and configure wget for Windows: Download wget for Windows and install the package. Copy the wget.exe file into your C:\Windows\System32 folder. Open the command prompt (cmd.exe) and run wget to see if it is installed.
bashrc in git-bash and append export PATH=$PATH:/c/Program\ Files/Git/bin:/c/Program\ Files/Git/cmd . Reopen git-bash and try git , ls and env . Try export PATH=$PATH:/c/Program\ Files/Git/bin:/c/Program\ Files/Git/cmd:/c/Programe\ Files/Git/usr/bin .
The Git Bash environment has a lot of Linux commands. I also use it as a Linux shell. Today, I need wget command to download files from the Internet. Sadly, Git Bash doesn’t has it.
Check `wget` command is installed or not. Run the following command to check the installed version of `wget` command. If the command is not installed before then you will get the error, “ – bash:wget:Command not found ”. The following output shows that wget command of version 1.19.4 is installed on the system.
In order to resolve the “bash: wget: command not found” error, you need to install the wget utility on the server. Example installation log: root@ubuntu :~# apt-get install wget Reading package lists...
Run the following command to install wget command on Ubuntu. $ sudo apt-get install wget After completing the install, again run the previous command to check the install version of this command. Run the wget command with –h option to display all option details of this command.
With the command:
pip install wget
you installed this Python library https://pypi.org/project/wget/, so you can use that from inside Python:
import wget
I imagine what you actually want is to be able to use wget
from inside Git bash. To do what, install Wget for Windows and add the executable to the path. Or, alternatively, use curl
.
If you would like to use curl
on Git Bash
, here is an example:
$ curl -kLSs https://github.com/opscode/chef-repo/tarball/master -o master.tar.gz
$ ls master.tar.gz
master.tar.gz
-L
follow redirects-o
(lower case O) to write output to file instead of stdout.Ss
silent mode, but show errors, if anyk
allows curl to proceed and operate even for server connections otherwise considered insecure.Reference: curl manpage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With