pyLightGBM
pyLightGBM copied to clipboard
Permission Denied Error?!
I got this error. Any idea? ps: ubuntu 14.04 with python 2.7
Not sure, but maybe you don't have rights to write files on hard drive. Try to change your permissions or try to launch everything in Saudi.
in sudo.
Sorry
@EBazarov I logged as a root user in ubuntu and now I checked the permissions of folder. everything looks normal. Also I launched jupyter notebook with sudo but I got the same error.
You have Windows ? If so try to add ".exe" to the end of exec path.
@EBazarov nope. Still permission denied. Btw thanks for your help.
@silverstone1903 have you been able to solve your problem ? Forgot to mention, but this wrapper has never been tested under python 2, only python 3+
@ArdalanM I guess I've tested under Python 2 and it doesn't work 😄
It works under Python 2, but you have to replace following line (occurs 3 times)
line = process.stdout.readline()
with
line = process.communicate()[0]
in models.py. I guess it should work even for Python 3.
@martinkersner thanks for your feedback.
Updated master branch with 63d5a48, hope this solve your problem.
Let me know, Thanks
Thanks for your solution advice! @martinkersner
I'll try as soon as possible then I'll give you a feedback. @ArdalanM
@ArdalanM still same, permission denied. I re-installed LightGBM and pyLightGBM but nothing changed. Something related about my PC but I don't have any idea 😞
I get "permission denied" in OS X, but everything is fine in Ubuntu 16.04
I get permission denied in Windows as well. Could someone help. Here's the exact error:
PermissionError Traceback (most recent call last)
C:\Program Files\Anaconda3\lib\site-packages\pylightgbm\models.py in fit(self, X, y, test_data, init_scores) 129 130 process = subprocess.Popen([self.exec_path, "config={}".format(conf_filepath)], --> 131 stdout=subprocess.PIPE, bufsize=1) 132 133 else:
C:\Program Files\Anaconda3\lib\subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds) 945 c2pread, c2pwrite, 946 errread, errwrite, --> 947 restore_signals, start_new_session) 948 except: 949 # Cleanup if the child failed starting.
C:\Program Files\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session) 1222 env, 1223 cwd, -> 1224 startupinfo) 1225 finally: 1226 # Child is launched. Close the parent's copy of those pipe
PermissionError: [WinError 5] Access is denied
@nareshshah139 welcome to the club 😆
I need to find a Windows/MacOS environment to reproduce this error.
Any help would be much appreciated. The problem has to do with this part :+1:
I checked how you integrated my suggestion and it turned it you didn't do it at all. For those who are still having difficulties, you can try out my fork (https://github.com/martinkersner/pyLightGBM). It is 14 days old version, but it could help you to solve your problem.
@martinkersner I tried your repo. It still gives the same permission error.
I have same issue both on Win10 and LinuxMint... On mint, I needed to set correctly path for lib: exec_path = '/home/myUsername/LightGBM/lightgbm'
not exec_path = '/home/myUsername/LightGBM' or exec_path = '/home/myUsername/LightGBM/lib_lightgbm.so'
On win10 server I need to run script as admin for some reason and also setting correct exec_path. 'c:/your_path/LightGBM-master/windows/x64/Release/lightgbm'