question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import 'ipdb', even when running in 'ipython'

See original GitHub issue

I have ipython installed, and it works fine – but for whatever reason, I’m unable to import ipdb. I’m not sure how to further troubleshoot this.

$ python3 -m pip -q install ipython

$ ipython3 --profile=none
Python 3.8.9 (default, May 11 2021, 02:10:31)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help.

IPython profile: none

In [1]: import ipdb
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-5aecdc9391ac> in <module>
----> 1 import ipdb

ModuleNotFoundError: No module named 'ipdb'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MrMinocommented, May 16, 2021

You need to pip install ipdb first in order to get IPython PDB implementation as a separate module / command.

0reactions
ivanovcommented, May 18, 2021

I thought ipdb came as part of ipython. Apparently not?

not as an importable module. As I wrote above, you can get to the debugging mode in ipython, which does have a leading ipdb> prompt - that’s part of IPython - but not import ipdb - that’s a separate project.

I’m going to go ahead and close this, since this is not an IPython issue.

Happy hacking! :bowtie:

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named 'ipdb' - Stack Overflow
I've run pip install ipdb but when I run import ipdb in iPython I still get the error: ImportError: No module named 'ipdb'....
Read more >
Errors importing ipdb · Issue #81 · gotcha/ipdb - GitHub
I cannot seem to be able to import ipdb when using ipython notebook. I can import ipdb in all other instances (i.e. ipython...
Read more >
IPython reference — IPython 8.7.0 documentation
# Try running this code both at the command line and from inside IPython (with # %run example-embed.py) from IPython.terminal.prompts import Prompts, Token ......
Read more >
Debugger — Spyder 5 documentation
A Spyder IPython console window, showing the ipdb debugger in action ... You can, for example, run %ls to list the contents of...
Read more >
Category Development - Andrea Grandi
If we try to use the usual ipdb commands from a Jupyter (IPython notebook). import ... __main__ import set_trace, post_mortem, pm, run, runcall,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found