Connecting Python 3 and Electron with a simple example
You'll need Node.js and Python 3 installed on your computer in order to run this app.
$ git clone https://github.com/cjadeveloper/electron-py-ex
$ cd electron-py-exMake sure that Python 3 is installed on your system
$ python -V
Python 3.8.5Create a Python virtual environment in the same directory, activate and install dependencies
# Create a venv
$ python -m venv .venv
# Activate: Win: .venv\Scripts\activate.bat ; Linux bash: source .venv/bin/activate
$ source .venv/bin/activate
# install dependencies
$ (.venv) pip install -r requirements.txtNote: If you know how some python dependency managers like poetry or pipenv (or whatever) works, you can use them instead of pip. I particularly use poetry. Anyway, I have shown how to install the dependencies with pip although I leave the pyproject.toml file for reference.
Install node dependencies and run
$ npm install
$ npm startFor Poetry users you can launch the app:
$ npm run dev