Installation
Install Python
Python should already be preinstalled in Mechanix OS. If not, the below command will install Python 3 using the apt package manager.
$ sudo apt install python3
After installation, verify that python
and pip
are properly installed:
$ python --version
$ pip --version
Running an example
Let's create a simple hello world program to test Python.
1
Create a new directory, and a new source file for your go program.
$ mkdir hello_python && cd hello_python
$ nano main.py
2
Paste the following program in the editor
print("Hello, Python!")
3
Now lets compile and run the program.
$ python hello.py
Hello, Python!
You are all set now, you are ready for running Python
on the Comet 🐍!