0

I can't find the command prompt for Python. I used to use it as my primary calculator on windows 10. I only have idle and the IDE. I just made a small program in Python, but it won't run it in a command prompt! When I click on it, it just opens its source code. The only way to run it is to use the test run feature. I tried to run it through the terminal, but it just keeps telling me it can't find the file.

Why can't I get python's command prompt to come up? Is it not a feature in Ubuntu? Why would that be? That makes no sense. Python is installed, so why can't you run python programs? If I can't do that, I can't see myself using Ubuntu.

1 Answers1

1

A better way to run Python code from the terminal in Ubuntu is to install the python3-ipython package. ipython3 is an enhanced interactive Python 3 shell that allows you to copy/paste a line of Python code or a Python code block into the terminal and run it interactively.

To install python3-ipython in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install python3-ipython

To start the ipython3 interpreter type ipython3 and to exit from the ipython3 interpreter type exit

karel
  • 122,292
  • 133
  • 301
  • 332