oxwhirl / pymarl

Python Multi-Agent Reinforcement Learning framework
Apache License 2.0
1.89k stars 387 forks source link

git.util Failed checking if running in CYGWIN due to: FileNotFoundError(2, '系统找不到指定的文件。', None, 2, None) #113

Open yileli opened 3 years ago

yileli commented 3 years ago

When I run main.py, it occurs that:

(pymarl) D:\star\pymarl>python src/main.py --config=qmix --env-config=sc2 with env_args.map_name=2s3z [DEBUG 14:29:26] git.cmd Popen(['git', 'version'], cwd=D:\star\pymarl, universal_newlines=False, shell=None, istream=None) [DEBUG 14:29:26] git.cmd Popen(['git', 'version'], cwd=D:\star\pymarl, universal_newlines=False, shell=None, istream=None) [DEBUG 14:29:26] git.util Failed checking if running in CYGWIN due to: FileNotFoundError(2, '系统找不到指定的文件。', None, 2, None) [INFO 14:29:26] root Saving to FileStorageObserver in results/sacred. [DEBUG 14:29:29] pymarl Using capture mode "fd"

Can you help me solve it? Thanks.

hijkzzz commented 3 years ago

please use any linux x64

happyfir commented 3 years ago

please use any linux x64 Does this mean to deploy the pymarl on linux x64
l try to run this on windows10 and have the same problem @hijkzz

yanangao1709 commented 3 years ago

have you solved this problem?

happyfir commented 2 years ago

have you solved this problem?

I run it on ubuntu

CapacitorSet commented 1 year ago

I had the same issue. Running with strace revealed that something was calling /usr/bin/uname, but on my machine uname was at /bin/uname.

This should fix it:

sudo ln -sv /usr/bin/uname $(which uname)
alexanderLinear commented 4 days ago

I spent a tiny little bit more of research:

git.util looks for the "git" command and gets its path. (Its probably the CYGWIN folder its looking for.) Then the path is used for operating 'uname' to get certain value from that program - which might be some "cygwin" string. (but the code that i have linked below is not doing any sort of checks, just presences... i would not trust that right now to be an sort of sane check method concept/design.) The exception might happen for when there is no uname aside to git in those folder. (Other root causes are possible.)

For the fix (the above proposal has seemingly the wrong order of arguments for 'ln' anyways. it is ) this might serve you - at least in principle:

$ which git
/usr/local/bin/git
$ sudo ln -sv $(which uname) /usr/local/bin/uname
'/usr/local/bin/uname' -> '/usr/bin/uname'

some(!) code reference - see about Line 405: https://www.atlas.aei.uni-hannover.de/work/yifan.wang/newsearch/env/lib64/python3.7/site-packages/git/util.py

alexanderLinear commented 4 days ago

PS: here is some more reliable code sequence (for bash shell) that demonstrates how to get the "CYGWIN" string for comparison. Maybe it has its reason to first look for uname aside to git - but there is no fallback path at all, if there is no such file. the code will only issue the problematic exception message instead. and as pinpointed, i feel like the code totally misses checking for the returned string.

https://stackoverflow.com/a/3466183/3423146

alexanderLinear commented 4 days ago

issued a ticket for GitPython folks.