Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget command not found in git bash

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?

like image 789
Aimee Avatar asked Jul 05 '20 11:07

Aimee


People also ask

How do I fix wget command not found?

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.

How do I enable wget?

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.

How do I fix git command not found?

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 .

Does Git Bash have Wget command?

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.

How to check if Wget is installed or not in Linux?

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.

How to resolve “Bash Wget command not found” error?

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...

How do I run WGET on Ubuntu?

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.


Video Answer


2 Answers

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.

like image 180
Paolo Avatar answered Oct 09 '22 04:10

Paolo


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 any
  • k allows curl to proceed and operate even for server connections otherwise considered insecure.

Reference: curl manpage.

like image 43
jumping_monkey Avatar answered Oct 09 '22 03:10

jumping_monkey