Python is build as portable, this means you can just install python for your debian (in fact there is python shipped with debian, but you can install more versions of python). If you have some specific reason to use windows version, wine is not a way to go. Much better (and easier) way is to use VirtualBox and emulate whole windows. Actually You can use the latest python3.7 / python2.7 on wine: basically all You need is to install python on a windows machine (for 'current user', not for 'All Users'), and copy the whole directory to the wine machine. Alternatively You can download it from Python releases download pages. There's three ways we can do this. One is installing using the source. The second is the windows exe in wine. The third is installing via Ubuntu PPA (if you use Ubuntu). Install from source Make sure you have python and pyqt4 installed (python-qt4?) Download the source: (pylotro website is no more).
Wine is a popular utility tool that allows you to easily use Windows applications in Linux environment. In other words, it allows you to run .exe files in Linux. You can also use it to call Windows applications from scripts, or access them remotely. In this article, we will look at how to install & use Wine in Linux.
How to Install & Use Wine in Linux
Here are the steps to install & use Wine in Ubuntu Linux.
1. Enable 32-bit architecture
Open terminal and run the following command to enable 32-bit architecture using dpkg command.
2. Add Wine Repository Key
Next we add Wine repository key with the following command.
Once the repository key is added, you should get OK as output. Quick sales for mac.
3. Enable Wine Repository
Next, we need to enable Wine repository with the following command.
4. Update System
Run the following command to update system packages.
5. Install Wine 6.0 in Ubuntu
Now we need to install Wine 6.0 using apt package manager.
Install Python 3.7 Wine
Once the installation is complete, you can verify its version with the following command.
Failed To Install (wine) Python 3.4.4
6. Use Wine
You can easily use wine by downloading setup/binary files that you want to run and specifying it after wine command. Here is an example to run node.exe file in wine.
Wine command will begin by creating Wine config file in home directory, ~/.wine. It will automatically download and install any dependencies for these windows applications, and display all prompts during this process.
In this article, we have learnt how to install and use Wine utility in Ubuntu Linux.
Also read:
How to Iterate Over Multiple Python Lists in Parallel
How to List All Files in Directory in Python
How to Send HTML Email with Attachment in Python
Postfix Email Configuration Step by Step
How to Install Go Access Log Analyzer in Ubuntu
Related posts:
Using Wine and Pyinstaller.
Pyinstaller is a program that packages Python programs into stand-alone executables, under the most used OSs (Windows, Linux, Mac OS X, FreeBSD, Solaris and AIX).
Initially Pyinstaller had a beta feature that allows the cross-compilation of a windows executable under Linux.
However, due the instability of the feature, it has been removed since version 1.5.
Fortunately, is still possible to package a Windows executable using PyInstaller under Wine.
Install Python 3 Wine
1. Install wine and Python
If you need to compile a 32bit executable, you need to install wine32:
2. Install PyInstaller on wine
3. Package a python scripts
Package Python scripts (e.g., helloworld.py) with pyinstaller.
Install Python Windows
The Windows executable file is located in dist/
.
Finally, transfer the executable on a windows box and test it: