- Install Python 3.6 at https://www.python.org/downloads/release/python-360/
- If you are a Windows 10 user, download and run the Windows x86 executable installer
- Select Install Now
- Keep track of what the installation path is
- The default is %HOME%\AppData\Local\Programs\Python\Python36-32
- Download PyCharm community edition and install with default settings
- Open this project within PyCharm
- Open the root directory (PythonGUIs)
- Cancel or skip anything that shows up immediately upon opening
- Reopen this README.md file in PyCharm
- This allows you to use the .md previewer
- It will render this file into more readable text
- Click the Show Preview Only in the top right corner of the editor will allow you to view this rendered file without the text editor open next to it
- Once the project loads, do the following setup:
- Go to File->Settings->Project: PythonGUIs->Python Interpreter
- Click the cogwheel near the upper right-hand corner and click Add...
- Select Virtualenv Environment in the left pane
- Select New environment in the right pane
- Hit OK
- The above setttings will likely be the default options
- Let PyCharm do the work to create a new virtual environment
- Exit the settings menu by hitting OK
- Open the Terminal on the lower left of the PyCharm window
- To install the prerequisite packages to run and compile your application,
run the following commnand:
pip install -r requirements.txt
- This command will output a bunch of progress details and other information
- Ignore warnings (in yellow)
- Let me know if there are any errors (in red)
- To install the prerequisite packages to run and compile your application,
run the following commnand:
Navigate to the src/main/python directory in the Project pane. Run average_calculator.py
by right-clicking the file in the Project pane and hitting Run 'average_calculator'.
Alternatively you can run it from the Terminal by executing the following command in the root directory:
python src/main/python/average_calculator.py
In the root directory of the project, run the following command:
fbs freeze
This command can take a few minutes to complete execution.
This will create a folder within the target
directory called AvgCalc
. Within that directory
there will be an executable AvgCalc.exe
that will run the custom GUI. This folder can be
moved to any location on your PC or another PC with the same operating system and run.
I created this project in part by following this tutorial:
https://build-system.fman.io/pyqt5-tutorial