How to run your code in Windows
hello,
My computer system is Windows. There are always errors when I run make. Can I write a method to run it directly in python xx.py without using make.
For example, when I run the code make build-all path=experiments/configs/ETTm2, I get the following error:
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
/usr/bin/sh: line 1: make: command not found
make: *** [Makefile:7: build-all] Error 127
In addition, I tried various methods to install make, but they couldn't solve this problem.(it may be my computer problem)
Thank you.
It's a bad fix, but if you use WSL, you should be able to use make in Linux. WSL has a mount point on the Windows system, so you should be able to move your files/software between the two easily
这是一个不好的修复,但如果你使用 WSL,你应该能够在 Linux 中使用 make。WSL 在 Windows 系统上有一个挂载点,所以你应该能够轻松地在两者之间移动你的文件/软件
Thank you very much. I will try it when I have time
you need to install make,referance https://gnuwin32.sourceforge.net/packages/make.htm, then configure environment variables, next,you can run make command
maybe you have not configure environment variables about the make
Hi, i found a solution for windows from https://stackoverflow.com/questions/32127524/how-to-install-and-use-make-in-windows. I tried the answer provided by MosGeo and it works.
Open cmd and run winget install gnuwin32.make; add C:\Program Files (x86)\GnuWin32\bin into windows PATH environment variable.
I also add C:\Program Files\Git\mingw64 into it.
ps. I've seen someone (but i don't remember where) add new system variable, with name make and value C:\Program Files (x86)\GnuWin32\bin\make.exe.
Then we can use make command.
Another problem is, when building experiments, there may occur process_begin: CreateProcess(NULL, dirname E:/xxx/DeepTime-main/makefile, ...) failed.
This may be caused by some commands in the makefile that cannot be recognized by windows system, I changed ROOT := $(shell dirname $(realpath $(firstword ${MAKEFILE_LIST}))) into ROOT := $(subst /,\,$(dir $(realpath $(firstword $(MAKEFILE_LIST))))), then it works.
I'm not familiar with linux and i just got this solution from gpt, so i'm not sure whether it is reasonable. As gpt also suggested to change
for config in $(shell ls ${path}/*.gin); do \
make build config=$$config; \
done
into
for config in $(subst /,\,$(wildcard $(path)/*.gin)); do \
make build config=$$config; \
done
but it failed (so i can't use build-all command either).
Hi guys, sorry for the late reply. The makefile is just calling this command python -m experiments.forecast --config_path=${config} build_experiment to generate the command files. You can run the python script directly.