Issue
If i execute any system commend in ipython2/3 on my ubuntu 16.04 machine, I get permission denied error as follows:
In [1]: ls
--------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
<ipython-input-1-5b21b94dda0e> in <module>()
----> 1 get_ipython().magic('ls ')
I did not need to do anything special in ubuntu 14.04. I have installed ipython2 and ipython3 with
pip2 install ipython --user
pip3 install ipython --user
I also tried installing it system-wide with sudo as
sudo pip2 install ipython
sudo pip3 install ipython
but the problem still persists. I do not get this problem in jupyter notebook. Any clue will be highly appreciated.
Solution
When I was setting up my machine, I created a dummy rootUser as the first admin user. Later on, I created another user with the same name, uid and gid as my workplace and added it to sudo. This some how causes permission problems which is really strange. Though I do not know the actual cause of the problem but I did reproduce it with the above steps. I solved this problem by creating the first user with the name same as my workplace. Later i changed the uid and gid and file/directly permissions accordingly. This solved the problem and I can now use ipython2/3 normally.
Answered By - Imran
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.