Broken python installation

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Important information

Broken python installation

Postby MicDac on 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
Level 1
Level 1
Posts: 2
Joined: Mon May 28, 2012 5:49 am

Linux Mint is funded by ads and donations.

Re: Broken python installation

Postby mdavies5 on 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
User avatar
Level 3
Level 3
Posts: 128
Joined: Sat Aug 11, 2012 1:02 am

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 2 guests