Ipython notebook and python virtualenv, permission


 
Thread Tools Search this Thread
Top Forums Programming Ipython notebook and python virtualenv, permission
# 1  
Old 12-29-2014
Ipython notebook and python virtualenv, permission

Hello,
I was playing with ipython-notebook and python virtualenv. I met a "permission denied Error" when I tried to run ipython notebook.
Code:
~/test $ ipython
Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 5, in <module>
    from pkg_resources import load_entry_point

IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/numpydoc-0.5-py2.7.egg/EGG-INFO/top_level.txt'

But if I do under root account, it works fine, which seems not right anyhow.
I could not remember what I did at installation for either package and the related dependencies like numpy, scipy etc, but copy-paste those commands from website. Most of the time with sudo pip install or sudo easy_install for ipython notebook and python virtualenv.
I suspect there might be some conflict between ipython notebook and the virtualenv, or the path settings, but I am not sure how to ask the question. Googled for a couple of hours, no clue at all for this error. What may have caused this problem?
Thanks a lot!

Last edited by yifangt; 12-29-2014 at 01:33 AM.. Reason: Add more information
# 2  
Old 12-30-2014
Googled more and finally found similar problem with matplotlib in Mac OSX from this place, First peeked the file permission:
Code:
$ ls -al /usr/local/lib/python2.7/dist-packages/numpydoc-0.5-py2.7.egg/EGG-INFO/top_level.txt
-rw-r----- 1 root staff 9 Dec 28 13:03 /usr/local/lib/python2.7/dist-packages/numpydoc-0.5-py2.7.egg/EGG-INFO/top_level.txt

so I change the ownership of the file:
Code:
$ sudo chown myself:myself /usr/local/lib/python2.7/dist-packages/numpydoc-0.5-py2.7.egg/EGG-INFO/top_level.txt

Then ipython works now under regular account!
Code:
~/test $ ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]:

However, I still do not understand the how that happened. Any elaboration is still needed. Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Hardware

HP notebook PC wifi card whitelist problem

I have hp dv6 and dv7 notebook pcs on which I want to upgrade the wifi cards but when I install the new cards and boot them, the they won't even boot to the bios and they both give me the same error: "104-Unsupported wireless network device detected. System Halted. Remove device and restart." When... (1 Reply)
Discussion started by: milhan
1 Replies

2. Ubuntu

Why they(one PC and a notebook) report bing in offline state?

Hi,all: Why they(one PC and a notebook) report bing in offline state? I directly link a PC with one notebook with a cross cable and all of them are on ubuntu 10.4.0.The only difference is that the PC are on kernel 3.0.4.When they startup information are showed respectively that... (0 Replies)
Discussion started by: liklstar
0 Replies

3. UNIX for Dummies Questions & Answers

Choosing a distribution for old 128MB Notebook

Well, the title says most of it - I have an old IBM Thinkpad 600X with 128MB ram and want to use it mostly as a netbook - web browsing, lite text editing and the like. I've tried a few distributions, but they all seem to choke on my limited memory. Before I download and burn another bunch... (2 Replies)
Discussion started by: mrkrieger
2 Replies

4. UNIX for Dummies Questions & Answers

Which linux for older notebook PC?

Hey forum, Although I've been involved with IT for decades, as an old person I'm just getting my feet wet with Linux. I have an older IBM ThinkPad - 128MB, 20GB drive - and I want to delve into Linux on this machine. What distribution would you reccomend for this older machine? It'll be used... (1 Reply)
Discussion started by: mrkrieger
1 Replies

5. What is on Your Mind?

Which Notebook to buy

Hi Im not sure that i post that Thread here on the right place but i hope someone can help me. Im searching for a new Notebook with Linux or Unix as system. Im looking for a Notebook with the following components: Intel Core 2 for mobile min 2GB RAM 15 " Display none reflective ATI or NVidia... (6 Replies)
Discussion started by: MagicMike
6 Replies

6. UNIX for Dummies Questions & Answers

Notebook UNIX systems

Hy folks, I was wondering what is best unix system for notebook (laptop) computers. Older or newer, faster or slower? What is you opinion and experiance with unix on notebook?v (6 Replies)
Discussion started by: R@LE
6 Replies

7. UNIX for Dummies Questions & Answers

Trying to find a notebook or desktop with....

a preloaded version of linux/unix on it for a realtively low price. I am looking to spend anywhere from Free-$800. I want to make sure its upgradeable so after i learn linux/unix/scripting and one of the programming languages i can update things and make them better. Assembly is not a problem i can... (10 Replies)
Discussion started by: Corrail
10 Replies

8. News, Links, Events and Announcements

Linux Notebook for $500

Balance 14.1" Notebook Computer with CD-ROM Drive (2 Replies)
Discussion started by: Perderabo
2 Replies
Login or Register to Ask a Question