All welcome. I recently switched to it, and if I’m more precise, I’m trying to switch to Linux (Ubuntu 18.04), so, like everything after Windows, I’m slightly shocked by the installation process. If essentially, I try to install ptpython or ipython . I follow the instructions, put a PIP, put a ptpython or ipython through it, it seems like all the packages downloaded, did not issue any errors, but the ptpython terminal does not start:

genrikh@77529:/$ ptpython Command 'ptpython' not found, did you mean: command 'pvpython' from deb paraview-python command 'pmpython' from deb pcp Try: sudo apt install <deb name> 

With ipython the same trouble. Just in the application they are nowhere to be found. The question is trivial, but still - how to install applications so that they run and if they do not start, then where and how to search for all the extra garbage that has downloaded and does not work?

 genrikh@77529:~$ ipython Traceback (most recent call last): File "/home/genrikh/.local/bin/ipython", line 7, in <module> from IPython import start_ipython File "/home/genrikh/.local/lib/python2.7/site-packages/IPython/__init__.py", line 49, in <module> from .terminal.embed import embed File "/home/genrikh/.local/lib/python2.7/site-packages/IPython/terminal/embed.py", line 18, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/genrikh/.local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 20, in <module> from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output ImportError: cannot import name create_prompt_application 
  • one
    ptpython is a module for python, not a standalone program. - Enikeyschik
  • possibly. in the makulutara I use to learn Python, it’s just said - an alternative to the Python command line - Heinrich K
  • 3
    ipython package is available in the official repository. so $ sudo apt install ipython - aleksandr barakin
  • that's how I put it. how to start it now? - Heinrich K
  • 2
    You will not believe - ipython . - 0andriy

1 answer 1

Ipython and Ptpython are the shells in which work is being done. In other words, this is work with the same console, but having its own characteristics. Downloading and installation takes place via pip or pip3, which do not require the rights of the root pip3 install ipython or pip3 install ptpython

The call is made by a usual call of commands from the console - ipython or - ptpython. It is advisable to install into the home folder, maybe you crookedly pulled, delete and try to install again

Note that for non-debian-based, the --user option may be required.

In general, of course, it is advisable to use Jupyter.

  • pip3 install --user then, otherwise they will swear at the access error (at least they swear at me) - andreymal 5:14
  • Well, the usual command call from the console does not work, because the executable files / usr / bin or / usr / local / bin will not appear and the console will declare that the command is not found - andreymal
  • Everything is possible, this is Linux) - MickeyUL 5:17 pm
  • I've checked it myself (I completed my instructions) and everything works for me - MickeyUL
  • Do not share a screenshot? I do not believe you, I have an access error i.stack.imgur.com/vGGgk.png - andreymal