I ran into this problem when trying to run gdb on a Ubuntu 12.04.1 system on the python I created. I expect Ubuntu to build some hooks on the gdb system to use the debug version of Python; but the hooks don't snap on anything on my own python. I went around this by creating my own gdb and doing this.
Here is the command line and full trace:
price@neverland :~/LSST/ip_diffim[master] $ gdb --args python tests/SnapPsfMatch.py 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 577, in get_config_var return get_config_vars().get(name) File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars _init_posix(_CONFIG_VARS) File "/usr/lib/python2.7/sysconfig.py", line 337, in _init_posix makefile = _get_makefile_filename() File "/usr/lib/python2.7/sysconfig.py", line 331, in _get_makefile_filename return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile") AttributeError: 'module' object has no attribute 'pydebug'
it looks like it is looking for the wrong python (in /usr/lib
), even though I told the system not to do this:
price@neverland :~/LSST/ip_diffim[master] $ which python /home/price/eups/Linux/python/2.7.2/bin/python price@neverl and:~/LSST/ip_diffim[master] $ echo $PYTHONPATH | grep usr price@neverland :~/LSST/ip_diffim[master] $
source share