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.

~/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!

Googled more and finally found similar problem with matplotlib in Mac OSX from this place, First peeked the file permission:

$ 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:

$ 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!

~/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!