Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Disclaimer: I'm running Arch Linux, not ubuntu, but that should be irrelevant, or if it isn't I should be able to translate from apt to pacman.

Whenever I attempt to use an application relating to python2(gnome-tweak-tool, bzr, etc.) it fails to start and, when run from command-line, I get this error:

    [username@host ~]$ gnome-tweak-tool
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 563, in <module>
  File "/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 243, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 419, in get_config_vars
  File "/usr/lib/python2.7/sysconfig.py", line 287, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/bin/lib/python2.7/config/Makefile (No such file or directory)

I checked /usr/bin/lib/python2.7/config/ and it is empty.

share|improve this question

closed as off topic by Jo-Erlend Schinstad, jrg Feb 19 '12 at 2:36

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

Its input/output error for system related issue such as file or directory not found/exist docs.python.org/library/exceptions.html#exceptions.IOError. Could you elaborate on what you are trying to achieve? –  sagarchalise Feb 18 '12 at 3:49
AFAIK /usr/bin should not have a lib folder as libraries are provided from /usr/lib folder. May be you should pass some argument for paths to look for during installation ? By the way gnome-tweak-tool is provided through arch official repositories so it should work unless you are trying a different tweak-tool ? –  sagarchalise Feb 18 '12 at 4:00
Yeah, there's definitely something we're missing here. It should be /usr/lib, not /usr/bin/lib. Something was definitely mistyped at some point. Can you just run the python command? –  Ken Feb 18 '12 at 17:13
This is offtopic here on Ask Ubuntu, I suggest you ask on Unix and Linux instead.. –  jrg Feb 19 '12 at 2:36
Moving to Unix and Linux. –  fwhiffahder Feb 23 '12 at 19:57

Browse other questions tagged or ask your own question.