file-not-found

Python open() gives IOError: Errno 2 No such file or directory

六眼飞鱼酱① 提交于 2019-11-25 23:34:34
问题 For some reason my code is having trouble opening a simple file: This is the code: file1 = open(\'recentlyUpdated.yaml\') And the error is: IOError: [Errno 2] No such file or directory: \'recentlyUpdated.yaml\' Naturally I checked that this is the correct name of the file. I have tried moving around the file, giving open() the full path to the file and none of it seems to work. 回答1: Make sure the file exists: use os.listdir() to see the list of files in the current working directory Make sure

Linux error while loading shared libraries: cannot open shared object file: No such file or directory

大城市里の小女人 提交于 2019-11-25 23:16:40
Program is part of the Xenomai test suite, cross-compiled from Linux PC into Linux+Xenomai ARM toolchain. # echo $LD_LIBRARY_PATH /lib # ls /lib ld-2.3.3.so libdl-2.3.3.so libpthread-0.10.so ld-linux.so.2 libdl.so.2 libpthread.so.0 libc-2.3.3.so libgcc_s.so libpthread_rt.so libc.so.6 libgcc_s.so.1 libstdc++.so.6 libcrypt-2.3.3.so libm-2.3.3.so libstdc++.so.6.0.9 libcrypt.so.1 libm.so.6 # ./clocktest ./clocktest: error while loading shared libraries: libpthread_rt.so.1: cannot open shared object file: No such file or directory Edit: OK I didn't notice the .1 at the end was part of the filename.