Python 3.11.4 is already installed. but i don't see it ? why

Python 3.11.4 is already installed. but i don’t see it ? why

i mean how can write python code in terminal in fedora. It can be in any way, it can be a text editor or a terminal, how to

nano hello.py

hello.py

print('Hello, world!')
python3 hello.py

ok, now I got it.

Description  : Python 3.11 is an accessible, high-level, dynamically typed, interpreted
             : programming language, designed with an emphasis on code readability.
             : It includes an extensive standard library, and has a vast ecosystem of
             : third-party libraries.
             : 
             : The python3 package provides the "python3" executable: the reference
             : interpreter for the Python language, version 3.
             : The majority of its standard library is provided in the python3-libs package,
             : which should be installed automatically along with python3.
             : The remaining parts of the Python standard library are broken out into the
             : python3-tkinter and python3-test packages, which may need to be installed
             : separately.
             : 
             : Documentation for Python is provided in the python3-docs package.
             : 
             : Packages containing additional libraries for Python are generally named with
             : the "python3-" prefix.

You can install a IDE like:

pycharm-community check in software or with dnf

If you prefer a Gui

Yes, use terminal and nano for example.
A howto you find on python documentation website

Why do we need two topics for that ?

1 Like

Python 3.11.4 is already installed. but i don’t see it by screen ? why
Where is python app by system?

In a terminal run this to find out what version of python is being used:

python --version

Screenshot from 2023-07-06 15-38-09
still not available

Anytime your system does something with Python, it’s using that version. What is it that you are looking for? Please be more specific.

As it appears on the front page when the software is clicked on window I want python to be like that
Screenshot from 2023-07-06 16-06-04

Do you just want an icon that opens a terminal and starts Python, or one of the many more sophisticated Python environments?

I don’t understand
what does you mean?

The python program is not an app for regular users to run, so there is no icon in your app launcher (this icon is created by a desktop file).

The python program is used by other programs written in Python.

The icon in your screenshot is not Python. It is PyCharm, an IDE for programmers to write Python programs.


Do you want to install PyCharm? The free PyCharm Community Edition is available in Fedora via Copr.

You can install it from your terminal like this:

sudo dnf copr enable phracek/PyCharm
sudo dnf install pycharm-community

If you want to use the paid PyCharm Professional Edition (like your screenshot), you will need to consult JetBrains website.

2 Likes

I mean I can’t write python code in terminal in fedora


OS system

In your first command,

python hello.py

there is no file hello.py in your current directory. The error message clearly states this. You need to give the correct path or filename to your file.


In your last 2 commands (which are the same),

python3 -c "print('Hello, world!')"

the exclamation mark ! is interpreted by the shell (bash) for history expansion. See here for an explanation.

It’s quite complicated, so I recommend you do not write your Python code in the terminal like this.

I suggest you either:

  1. Use Python interactively, by typing python first, then typing your Python code, like this:

    $ python
    Python 3.11.4 (main, Jun  7 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> print('Hello, world!')
    Hello, world!
    >>> 
    
  2. Or, write your code in a file (like hello.py) and run it with python hello.py

I also suggest you try Thonny. It is an IDE designed for learning Python.

You can install Thonny like this:

sudo dnf install thonny

Open Thonny from the icon, and type your code into the editor window (just like a text editor).

Press F5 or click the :arrow_forward: “Run” button to run your code. You will see the results at the bottom of the editor window.

2 Likes

Merged into one.

1 Like

See

Fedora Magazine has a lot more about Python

1 Like