[Tutor] ImportError: No module named '_sysconfigdata_m'

Albert-Jan Roskam fomcl at yahoo.com
Tue Sep 24 14:18:52 CEST 2013


________________________________
> From: Oscar Benjamin <oscar.j.benjamin at gmail.com>
>To: Albert-Jan Roskam <fomcl at yahoo.com> 
>Cc: Python Mailing List <tutor at python.org> 
>Sent: Tuesday, September 24, 2013 1:47 PM
>Subject: Re: [Tutor] ImportError: No module named '_sysconfigdata_m'
> 
>
>On 23 September 2013 20:28, Albert-Jan Roskam <fomcl at yahoo.com> wrote:
>> Hi,
>>
>> I just wanted to type "git status" in my Linux terminal but I made a typo
>> and I got a long Python 3.3 traceback message. Just curious: What does it
>> mean?
>>
>> gigt status
>> Traceback (most recent call last):
>>   File "/usr/lib/python3.3/site.py", line 631, in <module>
>>     main()
>>   File "/usr/lib/python3.3/site.py", line 616, in main
>>     known_paths = addusersitepackages(known_paths)
>>   File "/usr/lib/python3.3/site.py", line 284, in addusersitepackages
>>     user_site = getusersitepackages()
>>   File "/usr/lib/python3.3/site.py", line 260, in getusersitepackages
>>     user_base = getuserbase() # this will also set USER_BASE
>>   File "/usr/lib/python3.3/site.py", line 250, in getuserbase
>>     USER_BASE = get_config_var('userbase')
>>   File "/usr/lib/python3.3/sysconfig.py", line 580, in get_config_var
>>     return get_config_vars().get(name)
>>   File "/usr/lib/python3.3/sysconfig.py", line 530, in get_config_vars
>>     _init_posix(_CONFIG_VARS)
>>   File "/usr/lib/python3.3/sysconfig.py", line 403, in _init_posix
>>     from _sysconfigdata import build_time_vars
>>   File "/usr/lib/python3.3/_sysconfigdata.py", line 6, in <module>
>>     from _sysconfigdata_m import *
>> ImportError: No module named '_sysconfigdata_m'
>
>This message comes as Steven says from the Python code that checks
>unrecognised commands against the apt database to offer suggestions
>for how to install the command you want. The error message either
>results from a bug in Ubuntu (assuming it is Ubuntu) or it is because
>you've screwed with your system in some way (or both).
>
>Which version of Ubuntu are you using and did it come with Python 3.3
>or did you install that separately somehow? I've had problems before
>that come from installing newer Python versions that haven't yet been
>appropriately patched for Ubuntu.

Hi all, 


I was planning to reply after I had the chance to do some checks that were suggested (I am on a Windows computer now) but I can't resist replying now.  I am using Linux Mint XFCE. I have to look up the exact version number. I recently downloaded and installed Python 3.3. I downloaded the tarball and compiled, tested and installed everything as per instructions in the (readme? install?) file. There where hundreds of tests and I confess I didn't closely study the test results (some would fail anyway, such as winreg). Apart from the behavior that I posted, everything appears to work normally (phew) If I type "python", python 2.7 fires up. Also, I entirely removed python 3.2 (sudo rm -rf $(which python3.2), IIRC), which came with Linux Mint. Not sure if this is relevant, but I also installed Tox ,which is a wrapper for virtualenv that makes it easy to e.g. run nosetests with different python versions.


OoooOoOoh, I hope Steven is not correct that I messed up the Python version that my OS uses. ;-)

regards,
Albert-Jan


More information about the Tutor mailing list