GithubHelp home page GithubHelp logo

can't find ipython... about pudb HOT 11 CLOSED

inducer avatar inducer commented on August 25, 2024
can't find ipython...

from pudb.

Comments (11)

inducer avatar inducer commented on August 25, 2024

Did you choose IPython in the preferences? (Ctrl-P)

from pudb.

xuchen avatar xuchen commented on August 25, 2024

yep! Also I saw ipython was written in .config/pudb

from pudb.

inducer avatar inducer commented on August 25, 2024

As in, yep, solved, or, yep, still a problem?

from pudb.

xuchen avatar xuchen commented on August 25, 2024

ooops, yep, still a problem! :-(

from pudb.

inducer avatar inducer commented on August 25, 2024

Please try if this happens with the version from git.

from pudb.

xuchen avatar xuchen commented on August 25, 2024

yes, it still happens. How does pudb find ipython? if you can provide some steps, I'm willing to help debug.

from pudb.

inducer avatar inducer commented on August 25, 2024

Check

https://github.com/inducer/pudb/blob/master/pudb/shell.py

for the code that does the interfacing with IPython.

from pudb.

xuchen avatar xuchen commented on August 25, 2024

I found out that pudb.shell.HAVE_IPYTHON isn't set to true in the pudb shell. There's sth weird that I can't explain:

I modified shell.py to:

try:
    import IPython
except ImportError:
    HAVE_IPYTHON = False
    print 'have it!'
else:
    HAVE_IPYTHON = True
    print 'dont have it!'

When I first hit !, I got:

have it!
Hit Ctrl-D to return to PuDB.

Then I continued to type:

>>> import pudb.shell as shell
>>> shell.HAVE_IPYTHON
False

note here upon "import pudb.shell as shell" I didn't get either "have it!" or "dont have it!", which means the modified shell.py isn't executed. How come??? I checked my disk and didn't find another version of pudb installed.

If I run the above from a normal python shell, I would have shell.HAVE_IPYTHON == True, only inside a pudb-invoked python shell did I get shell.HAVE_IPYTHON == False

from pudb.

xuchen avatar xuchen commented on August 25, 2024

Ooops, I just found out my print 'have it!'/print 'dont have it!' insertion should've switched their places...

anyways, the issue is that pudb seems not able to import IPython even though I can import it both from a normal python shell and the pudb-invoked python sehll.

from pudb.

xuchen avatar xuchen commented on August 25, 2024

OK, I've identified the problem but couldn't explain why. I minimized to:

have a file called t.py containing only 1 line: "import IPython"

If I put this file to the pudb folder and run it, I have:

Traceback (most recent call last): File "t.py", line 1, in import IPython File "/home/xuchen/bin/lib/python2.7/site-packages/pudb-2012.1-py2.7.egg/pudb/IPython.py", line 6, in from IPython.frontend.terminal.interactiveshell import \ ImportError: No module named frontend.terminal.interactiveshell

At this time a file IPython.pyc was generated in the same folder, but no source file IPython.py.

If I put the file t.py into any other folders other than the pudb folder, it runs no problem. Any insight?

from pudb.

inducer avatar inducer commented on August 25, 2024

I think you have two different versions of IPython installed on your machine. This is not looking like a pudb issue.

from pudb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.