Electron is the best solution for Python multi-platform development

Here's an account that got stuck in a jar trying to follow the Python neighborhood later. After researching various things, I found an article on Qiita Making a desktop application with Python with Electron, so I decided to give it a try.

Almost everything can be cleaned up with brew and pip, so I recommend it.

It's okay to do Electron, HTML5, and JavaScript obediently, but I wanted to make something using Python, study, and use it to improve work efficiency. In addition, HTML5 and CSS3 can no longer follow from HTML3, so I thought that I should do it with python anyway. (It's also good for studying python)

Status of multi-platform development environment in Python area As of February 21, 2017

It's rotten ... it was too early. </ s>

I'm tired of being swayed by information around Python. I feel that it is impossible to complete with Python alone for the following reasons.

--When I try PyQt5 (with Python 3.6), I can't make it into an app because PyInstaller can't follow the 3.6 series. --PySide doesn't work in 3.4.6 (2.7 worked, but support will expire in 2019) --When I try wxPython, it returns that all versions are useless ――Since the UI of kivy is OpenGL, it is more suitable for 2D games and 3D games, so the purpose is different.

Perhaps there are other development methods, but I didn't feel like I was able to follow up because the Python3 system is already in a tattered state ...

I will escape to Electron.

As shown in Making a desktop application with Python with Electron, when I built it, it worked fine with both Python2 and Python3. *** I feel like I've found God. *** *** I have to do JavaScript too, but ... It also makes me want to do my best.

Mac version installation procedure

Install brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

A spell that makes you happy when you run it regularly

$ brew update;brew upgrade;brew prune;brew cleanup; brew doctor

Python and npm installation work

$ brew install python python3 npm

The state at this time is as follows.

$ python -V
2.7.13
$ python3 -V
3.6.0
$ npm -v
4.1.2

From the installation of Flask and Electron, it is as follows Making a desktop application with Python with Electron.

I did this.

$ pip install -U pip wheel setuptools Flask
$ pip3 install -U pip wheel setuptools Flask

In the article. The sample code hello.py has also been rewritten as follows and its operation has been confirmed.

#!/usr/bin/env python
Or
#!/usr/bin/env python3

The Mac version was OK.

Linux version (CentOS 7)

At a minimum, set up with Install python3 series on CentOS7 before starting.

Hit the following command as you would on a Mac.

$ pip install -U pip wheel setuptools Flask
$ python -V
3.6.0
$ npm -v
3.10.10

The following was additionally required.

sudo yum install libXScrnSaver

Everything else can be done with the support when implemented on a Mac. OKOK。 Thats nice.

Windows version (Win10 Pro)

At a minimum, Install Node.js / npm (for Windows) and [Install Python (for Windows)](http://qiita. com / taipon_rock / items / f574dd2cddf8851fb02c) and then start.

Carry out common work.

$ pip install -U pip wheel setuptools Flask

The version of npm in python is as follows.

> python -V
2.7.13
> npm -v
4.1.2

Everything else can be done with the support when implemented on a Mac.

Launching the app on Windows is slow ... When I thought, I put in 3.6 series, and when I looked it up, I was told "Windows does not work 3.6 series yet, Baccaro" I did. That's why I re-installed python 2.7.13, but if python 3.x system doesn't work on windows side, isn't it? That's because, though, I feel like I can go, so it's okay ...

Recommended Posts

Electron is the best solution for Python multi-platform development
Wagtail is the best CMS for Python! (Perhaps)
What is the python underscore (_) for?
Continuation of multi-platform development with Electron and Python
Personal best practices for VS Code-fronted Python development environments
python memo (for myself): About the development environment virtualenv
[For organizing] Python development environment
What is the interface for ...
What is Python? What is it used for?
[Python] What is @? (About the decorator)
[python] What is the sorted key?
Python for statement ~ What is iterable ~
Python development environment options for May 2020
Emacs settings for Python development environment
See python for the first time
Checking the NAOqi Python development environment
Command for the current directory Python
Create a Python development environment locally at the fastest speed (for beginners)
[Example of Python improvement] What is the recommended learning site for Python beginners?
Introducing the BOT framework Minette for Python
Python development environment for macOS using venv 2016
Python Master RTA for the time being
Why Python is chosen for machine learning
6 Python libraries for faster development and debugging
Where is the python instantiation process written?
Launch the Discord Python bot for 24 hours.
What is "mahjong" in the Python library? ??
MongoDB for the first time in Python
[python] [meta] Is the type of python a type?
Pandas of the beginner, by the beginner, for the beginner [Python]
Prepare the development environment for keyhac for Mac
The strongest Python development environment PyCharm's recommendation
Building a Python development environment for AI development
Solution: The jedi-vim pop-up display is broken
[Reinforcement learning] Search for the best route
The strongest Python integrated development environment PyCharm
Even if the development language is changed to python3 in Cloud9, version 2 is displayed in python --version
Prepare the development environment for Python on AWS Cloud9 (pip install & time change)
Data Science Virtual Machines is the best environment for data analysis from now on!
[Python] Number of integer sequences of length n for which the sum is m
[For beginners] Unexpected behavior if "\" is included when setting the path in Python
Notify slack when the switch sales page is updated ~ slack bot development with python ③ ~
[Note] The solution for Python on MacOSX where import hashlib causes an error
CERTIFICATE_VERIFY_FAILED in Python 3.6, the official installer for macOS
The fastest way for beginners to master Python
[Python] I tried substituting the function name for the function name
Introduction to Python Let's prepare the development environment
The story of low learning costs for Python
Created a Python wrapper for the Qiita API
vprof --I tried using the profiler for Python
Python Pandas is not suitable for batch processing
[Python] matplotlib: Format the diagram for your dissertation
[Xonsh] The Python shell is sharp and god
Upgrade the Azure Machine Learning SDK for Python
[Web development with Python] query is also redirect
I tried python programming for the first time.
Tips for hitting the ATND API in Python
Python: Prepare a serializer for the class instance:
[Python] I searched for the longest Pokemon Shiritori
Image processing? The story of starting Python for
This is the only basic review of Python ~ 1 ~