I am getting the following weird permission denied problem in python and this is happening whenever I login (SSH) as a normal user (means not root):
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 543, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 442, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 321, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/include/python2.7/pyconfig.h (Permission denied)
The permission to /usr/include/python2.7/pyconfig.h
reads like:
-rw-r--r-- 1 root root 35884 2011-10-04 17:24 /usr/include/python2.7/pyconfig.h
Not sure what is causing this problem, BTW, I know there are similar question to this problem (link1 and link2) but those are with respect to "No file or directory".