To check the version of python installed on your system:
Now that we're in the interactive mode:
print('Hello world')
#returns Hello world
Note that the interactive session is easy to use but it is not good for code reproducibility.
Python package installation with pip
#Data job automation with cron
Recap
# Preview both Python script and requirements text file
cat create_model.py
cat requirements.txt
# Pip install Python dependencies in requirements file
pip install -r requirements.txt
# Run Python script on command line
python create_model.py
# Add CRON job that runs create_model.py every minute
echo "* * * * * python create_model.py" | crontab
# Verify that the CRON job has been scheduled via CRONTAB
crontab -l