Broken python installation

Archived topics about LMDE 1
Forum rules
Level 1
Level 1
Posts: 2
Joined: Mon May 28, 2012 5:49 am

Broken python installation

Postby MicDac » Sun Jun 15, 2014 5:24 pm

somehow I managed to break my python installation, when I start from the terminal python I receive the following error:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 563, in <module>
  File "/usr/lib/python2.7/", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/", line 272, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/", line 247, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/", line 237, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/", line 578, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/", line 524, in get_config_vars
  File "/usr/lib/python2.7/", line 408, in _init_posix
    from _sysconfigdata import build_time_vars
  File "/usr/lib/python2.7/", line 6, in <module>
    from _sysconfigdata_nd import *
ImportError: No module named _sysconfigdata_nd

The might be related to an installation of the python-dev package. I tried without success:

Code: Select all

sudo apt-get --reinstall install python2.7

I have the current LMDE installed.
Would appreciate help!
Last edited by karlchen on Sun Jun 15, 2014 5:40 pm, edited 1 time in total.
Reason: "the current LMDE" => moved the thread from Main Edition to the LMDE sub-forum

User avatar
Level 3
Level 3
Posts: 151
Joined: Sat Aug 11, 2012 1:02 am

Re: Broken python installation

Postby mdavies5 » Thu Jul 17, 2014 10:07 pm

I presume you are a Python developer, which I am not. But you can trace the call to _sysconfigdata_nd from line 6 of
On my machine the file is located in /usr/lib/python2.7/plat-x86_64-linux-gnu/. Check if that is available on your machine.
I find it handy to use Synaptic to solve problems. In the search box type python. Set status to 'installed'. Highlight every item and right-click and select 'Mark for reinstallation' then 'Apply'.
Sometimes a file may get deleted but it is still marked as 'installed' and this prevents apt from re-installing it. This has worked for me when Cairo went AWOL.
Cheers, Mike

Return to “Archive”

Who is online

Users browsing this forum: No registered users and 2 guests