I am self-learning the convelutional neural network from the stanford cs231n course. I am trying to finish the assignment1. However, I just got totally confused about how to download the data. I followed the instructor and see
Download data: Once you have the starter code, you will need to
download the CIFAR-10 dataset. Run the following from the assignment1
directory:
cd cs231n/datasets
./get_datasets.sh
I don't understand what does it mean by "run" the following. Run what exactly? Previously, I use R so I understand what does "run R" means. But here it does not say run "what" or run the code in "where".
So I tried to run the code in command prompt, Anaconda Prompt, PowerShell or even Git Bash. The command prompt game error of "." is not recognized as an internal or external command. The PowerShell does not give error but does not give any result either. It just open a Text Document of code
# Get CIFAR10
wget http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
tar -xzvf cifar-10-python.tar.gz
rm cifar-10-python.tar.gz
The Git Bash gives me error of
get_datasets.sh: line 2: wget: command not found
tar (child): cifar-10-python.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: cannot remove 'cifar-10-python.tar.gz': No such file or directory
How to download this data? Please help! Thanks.
Download wget
& copy wget.exe to your git
C:\Program Files\Git\mingw64
then restart the git bash or Navigate to your folder where get_datasets.sh file is present.
run the following command in git bash
sh get_datasets.sh
Navigate to your folder where get_datasets.sh file is present using cmd.
Use the command .\get_datasets.sh in command prompt.
Make sure you are not missing wget. If wget is missing, install wget on your local machine and then run the shell script.
After installing wget properly use the instruction mentioned at the start.
I'm working a class assignment from machine learning course. We are given a hmm.tar file which contains c++ implementation of hidden markov models.
In the read me file the following was given.
To compile and test the program,
1) extract the code:
tar -xf hmm.tar
2) compile the programs:
make all
at the second step the output from the terminal is make: *** No rule to make target 'all'. Stop
I'm using windows10 OS and running cygwin terminal.
Please help me to sort this problem out. Here's the
Makefile
I'm guessing the tar file has files inside a subdirectory. You probably just need to make sure you're in the directory that has the Makefile, and then run make:
tar -xf hmm.tar
cd __somewhere_
make all
to help you know where the Makefile is, you could use:
tar tf hmm.tar | grep -i makefile
Since cygwin returns make: *** No rule to make target 'all'. Stop, it seems that make is installed correctly.
As such, it has to be two other things:
Either the make file inside the.tar is missing, or
there are syntactical errors present in the make file
I am using a makefile in windows to push some files on a Unix server (here a text file "blob.txt" in the same folder of my makefile).
My makefile script is:
setup:
pscp blob.txt username#hostname:/folder/
I start a command prompt, go in the folder where blob.txt and the makefile are present and type:
make setup
Which results in:
pscp blob.txt username#hostname:/folder/
process_begin: CreateProcess(NULL, pscp blob.txt username#hostname:/folder/, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [setup] Error 2
In a #fail ... whereas if I enter directly the command in the command prompt:
pscp blob.txt username#hostname:/folder/
It works ... I really wonder why.
The error
process_begin: CreateProcess(NULL, pscp blob.txt username#hostname:/folder/, ...) failed.
make (e=2): The system cannot find the file specified.
is almost certainly complaining that Windows cannot find pscp.
This is almost certainly because the value of %PATH% (or whatever) is different when make spawns a shell/console then when you have it open manually.
Compare the values to confirm that. Then either use the full path to pscp in the makefile recipe or ensure that the value of PATH is set correctly for make's usage.
I didn't want to remove GIT's bin folder from the PATH variable (I am using a Windows machine), as I use it quite often. So I looked for a workaround, and here it is:
Add the <git-installation-directory>/usr/bin directory to your PATH variable too. This basically adds the rest of the linux-like commands that come with the "GIT bash" to your environment. After applying this, my makefiles ran normally again. :)
If you are curious about what shell is being invoked by make, just add $(info $(SHELL)) at the beginning of your makefile. The path/name of the shell being invoked is printed to the console as soon as you run make.
I know this is an old question that has been answered, but thought I'd and my experiences for anyone still running into this. I was getting the same cryptic error Colonel Beauvel (though with the windows MOVE command, not pscp):
process_begin: CreateProcess(NULL, move /y foo\bar.c .\baz.c, ...) failed.
make (e=2): The system cannot find the file specified.
Our CI was running the same Makefile and working perfectly. Turns out CI was using mingw32-make and I was using GNU make. Uninstalling GNU make (which got installed as part of an unrelated bulk package) and aliasing mingw32-make to 'make' works perfectly.
#user3869623's solution works for me. I'd like to share some details of mine to complete the picture.
My makefile contains below target:
clean:
#echo '$(OS)'
ifeq ($(OS),Windows_NT)
del /s *.o *.d *.elf *.map *.log
endif
When I run make clean, I see this error:
Since it says something went wrong with echo, so I change my makefile target to below:
clean:
ifeq ($(OS),Windows_NT)
del /s *.o *.d *.elf *.map *.log
endif
This time, make clean gives me this error:
I am surprised to see bash here since I am working in Windows command line.
Then I checked my %PATH%, I see this entry:
C:\DevTools\Git\bin
There's a bash.exe and sh.exe in that path. So I removed this entry, and it works fine now.
BUT I STILL DON'T KNOW WHY BASH GET INTO THIS???
ADD 1
As to why the C:\DevTools\Git\bin shows up in my %PATH%, because I am using Sublime and it always asks me for the Git binaries:
In my case, I had git\bin in my %PATH% which contains bash.exe and sh.exe.
Removing %GIT_HOME%\bin from the PATH worked for me.
To build on user3869623's response.
In my case i had git\bin in my %PATH% which contains bash.exe and sh.exe.. Removing %GIT_HOME%\bin from the PATH worked for me
While this recommendation may allow make to run, it will likely cause issues for git, especially if the makefile is installing software from a git repository.
A better solution is to simply change %GIT_HOME%\bin to %GIT_HOME%\cmd
For those who tried removing the git bin folder from PATH and it didn't work for them, search your PATH variables for any paths containing bash.exe.
In my case I found a variable linking to cygwin bin folder C:\cygwin64\bin, removed it and it worked.
I had the same issue, and this thread really helped me solve it. In my case, it was a conflict between make and the sh.exe that was visible through my path, due to both git and mingw64. To fix my issue, without breaking Git, I added these lines to the top of my batch file that calls make:
set path=%path:git\bin=;%
set path=%path:mingw64\bin=;%
set path=%path:usr\bin=;%
This hides the extra sh.exe instances from make for that instance only.
I ran into this problem recently and this question was one of the top hits for my searches.
None of the other answers here helped me. The fix, for me, was to put the binary name in quotes:
setup:
"pscp" blob.txt username#hostname:/folder/
-"pscp" blob.txt username#hostname:/folder/ # Failure is OK, `-` in front
I'm on windows.
By explicitly setting my compiler to gcc (instead of cl?) it solved my problem.
CC = gcc
I hope some people more knowledgeable than me could explain why changing the compiler would impact the makefile parsing.
I would like to compress a directory.
tar -cvzf mydir.tar.gz mydir
but this retains symlinks so that it is not portable to a new system.
How can I convert symlinks?
I have tried
tar -cvzfh
since man tar says
-h, --dereference
don’t dump symlinks; dump the files they point to
but this results in an error
tar: Error exit delayed from previous errors
and creates a file called "zh"
My files are on a RHEL server.
Your tar.gz file name must follow immediately after the -f flag, merely reordering the flags may work.
tar -cvzhf mydir.tar.gz mydir
I've been trying to install zlib using the following website to guide me link
and I am currently stuck in the command make install which is the equivalent of
cp libz.a /usr/lib
cp /usr/lib
which returns the error from the command prompt
cp: missing destination file operand after '/usr/lib' .
Try 'cp --help' for more information.
does anyone have any idea what is going on. I've been scratching my head for a while since libraries and stuff are real confusing.
(the zlib directory is located in C:\zlib-1.2.5 )