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.

ptipython ImportError: No module named IPython.terminal.embed

See original GitHub issue
$ ptipython 
Traceback (most recent call last):
  File "/home/arthur/.virtualenvs/ptpython/bin/ptipython", line 9, in <module>
    load_entry_point('prompt-toolkit==0.21', 'console_scripts', 'ptipython')()
  File "/home/arthur/.virtualenvs/ptpython/local/lib/python2.7/site-packages/pkg_resources.py", line 353, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/arthur/.virtualenvs/ptpython/local/lib/python2.7/site-packages/pkg_resources.py", line 2321, in load_entry_point
    return ep.load()
  File "/home/arthur/.virtualenvs/ptpython/local/lib/python2.7/site-packages/pkg_resources.py", line 2048, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/arthur/.virtualenvs/ptpython/local/lib/python2.7/site-packages/prompt_toolkit/contrib/entry_points/ptipython.py", line 22, in <module>
    from prompt_toolkit.contrib.ipython import embed
  File "/home/arthur/.virtualenvs/ptpython/local/lib/python2.7/site-packages/prompt_toolkit/contrib/ipython.py", line 18, in <module>
    from IPython.terminal.embed import InteractiveShellEmbed as _InteractiveShellEmbed
ImportError: No module named IPython.terminal.embed

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jonathanslenderscommented, Oct 26, 2014

Thanks for reporting this. The problem is that IPython is not installed. If you run pip install ipython, then it should work.

I don’t want to make IPython a hard dependency, but I think I’ll fix this by showing a message and falling back to ptpython.

0reactions
gioulisapocommented, Nov 8, 2016

In my case I had to run sudo pip2 install ipython. If the default version of python is 3.x.x then the warning banned added by @jonathanslenders does not appear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named IPython - Stack Overflow
I am running a script that uses IPython module, in my terminal. If you are also trying to do something similar, this answer...
Read more >
Module: terminal.embed — IPython 8.7.0 documentation
This function sets an internal flag so that an embedded IPython will raise a IPython.terminal.embed.KillEmbedded Exception on exit, and then exit the ...
Read more >
Python Examples of bpython.embed - ProgramCreek.com
def run_ipython(local): try: from IPython.frontend.terminal.embed import ... no IPython module shell = 'python' if shell == 'python': import code try: # Try ...
Read more >
How to use the ptpython.ipython.embed function in ... - Snyk
if not no_ptipython: # Try PtIPython try: from ptpython.ipython import embed history_filename = os.path.expanduser('~/.ptpython_history') embed(banner1=self.
Read more >
ptpython - PyPI
import sys try: from ptpython.repl import embed except ImportError: ... Run ptipython (prompt_toolkit - IPython), to get a nice interactive shell with all ......
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