1, Creating Python files
- Open the terminal in the directory where you want to create the Python file
- Using commands" Create an empty Python file with the file name "touch. py"
- Open the file with a text editor or use the command" Nano file name. py" Open the file
- Enter the code in the editor
- Click save or press" Ctrl+ X" Save
2, Creating a Python environment
1. Obtain root privileges on the system
sudo -i

2. View system environment variables
echo $PATH

3. Set Python environment variables
export PATH=/usr/bin/python3.8:$PATH

4. Review the system's environment variables again
echo $PATH
