![](https://secure.gravatar.com/avatar/15cbc90543256ddc4d93e51f2b6b7500.jpg?s=120&d=mm&r=g)
Hallo! I have a problem using scipy in the python debugger (I do that with the eric4 IDE). When I step through the commands, I got the an error (only in debug mode!) at the statement: "import scipy" and the error is: ------8<-------- The file /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py could not be opened. ------8<-------- and then: ------8<-------- The debugged program raised the exception OSError "[Errno 2] No such file or directory: '/home/holzi/scipytest/test'" File: /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py, Line: 1659 Break here? ------8<-------- But my setuptools installation seems to be ok and the file /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/ is present. (my scipy version is 0.6.0, Python 2.5.1) Has anyone a hint what I can try to resolve this problem ? Many thanks, LG Georg
![](https://secure.gravatar.com/avatar/764323a14e554c97ab74177e0bce51d4.jpg?s=120&d=mm&r=g)
Georg Holzmann wrote:
Hallo!
I have a problem using scipy in the python debugger (I do that with the eric4 IDE).
When I step through the commands, I got the an error (only in debug mode!) at the statement: "import scipy" and the error is: ------8<-------- The file /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py could not be opened. ------8<-------- and then: ------8<-------- The debugged program raised the exception OSError "[Errno 2] No such file or directory: '/home/holzi/scipytest/test'" File: /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py, Line: 1659 Break here? ------8<--------
But my setuptools installation seems to be ok and the file /usr/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/ is present. (my scipy version is 0.6.0, Python 2.5.1)
Has anyone a hint what I can try to resolve this problem ?
Eric apparently does not know anything about zipped eggs. The setuptools egg is zipped and pkg_resource.py is inside of it. In debug mode, I imagine it tries to load the source of every module that gets imported. Remove the lines in scipy/__init__.py: """ try: import pkg_resources as _pr # activate namespace packages (manipulates __path__) del _pr except ImportError: pass """ I'm not really sure why we put them there, though. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
![](https://secure.gravatar.com/avatar/15cbc90543256ddc4d93e51f2b6b7500.jpg?s=120&d=mm&r=g)
Hallo!
Eric apparently does not know anything about zipped eggs. The setuptools egg is zipped and pkg_resource.py is inside of it. In debug mode, I imagine it tries to load the source of every module that gets imported.
Thanks - yes sorry, this problem is only with eric. I just tried pydev/eclipse and there is no such problem. I wanted to find a good IDE for numpy/scipy scripts - pydev/eclipse works quite good, but there is no interactive console during debugging where you could plot some numarrays ... Thanks, LG Georg
![](https://secure.gravatar.com/avatar/93476f0f6e1767a3de6043fa02e267bc.jpg?s=120&d=mm&r=g)
Hello, On a different slant on this topic: Is there documentation on how to setup a debugging environment for scipy? I mean by that some sort of step-by-step instructions on how to build a debugging version, what tools are useful (nm, objdump, etc.) and how to step thru the pdb and/or gdb at the same time. I once knew how to do this with extension modules with gdb but have lost the knowledge after years of disuse. This sort of documentation could help people like me who are users of scipy to acquire skills that can help the scipy developers when debugging problems. Georg Holzmann wrote:
Hallo!
Eric apparently does not know anything about zipped eggs. The setuptools egg is zipped and pkg_resource.py is inside of it. In debug mode, I imagine it tries to load the source of every module that gets imported.
Thanks - yes sorry, this problem is only with eric. I just tried pydev/eclipse and there is no such problem. I wanted to find a good IDE for numpy/scipy scripts - pydev/eclipse works quite good, but there is no interactive console during debugging where you could plot some numarrays ...
Thanks, LG Georg _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- Andres Corrada-Emmanuel Research Fellow Aerial Imaging and Remote Sensing Lab Computer Science Department University of Massachusetts at Amherst Blog: www.corrada.com/blog
![](https://secure.gravatar.com/avatar/15cbc90543256ddc4d93e51f2b6b7500.jpg?s=120&d=mm&r=g)
Hallo!
On a different slant on this topic: Is there documentation on how to setup a debugging environment for scipy? I mean by that some sort of step-by-step instructions on how to build a debugging version, what tools are useful (nm, objdump, etc.) and how to step thru the pdb and/or gdb at the same time. I once knew how to do this with extension modules
Yes this would be nice - I am currently also trying to debug python and c++ modules for python - so far I tried this now with eclipse (with CDT and PYDEV plugin) but I am not yet there where I want to be ... ;) ... however, I will try again next year ... LG Georg
participants (3)
-
Andres Corrada-Emmanuel
-
Georg Holzmann
-
Robert Kern