At the top of the code, first write:
#usr/bin/python or #usr/bin/env python Then create a new .sh file called setup.sh and write:
sudo apt-get install python python-pip sudo chmod +x yourfile.py sudo -H pip install librariesyouwant
Therefore, we eliminate the problem of the absence of python and the installation of any missing packages. To make a shortcut on the desktop, follow these steps:
sudo cp yourfile.py ~/Desktop/ sudo chmod +x ~/Desktop/yourfile.py
Please note that if your code is not created to create a GUI, you will need to run your code from the terminal using ./yourfile.py
wowcha Dec 08 '16 at 21:13 2016-12-08 21:13
source share