Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission Denied Error?! #18

Open
silverstone1903 opened this issue Oct 25, 2016 · 18 comments
Open

Permission Denied Error?! #18

silverstone1903 opened this issue Oct 25, 2016 · 18 comments

Comments

@silverstone1903
Copy link

silverstone1903 commented Oct 25, 2016

I got this error. Any idea?
ps: ubuntu 14.04 with python 2.7

lightgbm

@EBazarov
Copy link
Collaborator

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.

@EBazarov
Copy link
Collaborator

in sudo.

Sorry

@silverstone1903
Copy link
Author

@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.

@EBazarov
Copy link
Collaborator

You have Windows ? If so try to add ".exe" to the end of exec path.

@silverstone1903
Copy link
Author

@EBazarov nope. Still permission denied. Btw thanks for your help.

@ArdalanM
Copy link
Owner

@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+

@silverstone1903
Copy link
Author

@ArdalanM I guess I've tested under Python 2 and it doesn't work 😄

@martinkersner
Copy link

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.

@ArdalanM
Copy link
Owner

@martinkersner thanks for your feedback.

Updated master branch with 63d5a48, hope this solve your problem.

Let me know,
Thanks

@silverstone1903
Copy link
Author

silverstone1903 commented Nov 10, 2016

Thanks for your solution advice! @martinkersner

I'll try as soon as possible then I'll give you a feedback. @ArdalanM

@silverstone1903
Copy link
Author

@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 😞

@ternaus
Copy link

ternaus commented Nov 16, 2016

I get "permission denied" in OS X, but everything is fine in Ubuntu 16.04

@nareshshah139
Copy link

I get permission denied in Windows as well. Could someone help. Here's the exact error:


PermissionError Traceback (most recent call last)
in ()
21 )
22
---> 23 gbmr.fit(X_train, y_train, test_data=[(X_valid, y_valid)])
24 print("Mean Square Error:", metrics.mean_absolute_error(y_true=(np.exp(y_valid)-1), y_pred=(np.exp(gbmr.predict(X_valid))-1)))

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

@silverstone1903
Copy link
Author

@nareshshah139 welcome to the club 😆

@ArdalanM
Copy link
Owner

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
👍

@martinkersner
Copy link

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.

@nareshshah139
Copy link

@martinkersner I tried your repo. It still gives the same permission error.

@gugatr0n1c
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants