Python
Learning Python
- Automate the Boring Stuff with Python: This shows what you can do with python. Checkout the table of contents and skip around if you already know the basics.
- Python Data Science Handbook: I suggest looking through this only if you have a project requiring data processing.
- Python review: Learn PYTHON in 5 MINUTES
Python Environments
Python Environments: “venv
(for Python 3) and virtualenv
(for Python 2) allow you to manage separate package installations for different projects.”
Python Requirements.txt
To easily install program requirements on other computers, create a requirements.txt
. Rather than manually installing program requirements, you could just run one command to install all program requirements with a requirements.txt
Why and How to make a Requirements.txt
Create a requirements.txt
$ pip freeze > requirements.txt
Use a requirements.txt
$ pip install -r requirements.txt
PyInstaller
Used to make executable files into standalone executable files
. This is the preferred way to make python executables.
Note: the files are not 100% stand alone as they are still dependent on some core operating system libraries (for example, on linux to run the executable it’s dependent on glibc library).
To make a full standalone, you could create a pyinstaller executable then use CXFreeze.
- pip: PyInstaller: pyinstaller using pip (a package manager)
- PyInstaller Official Website: Main home page
CXFreeze
- CXFreeze.md: Used to make executable files into
standalone executable files
.
Deploying code to servers or other computers
- The approach I advocate for is to
create a Docker Environment with the program then move the Docker environment to different systems.
DockerContainers - One approach is to
copy the python program over then install dependencies used onto the computer
- One approach is to
create a stand alone executable
Code
Journal
- 2020-10-03
- Added
Journal
section - Added links to tutorials
- Added