WINE is a virtual Windows environment that allow the Windows software to be run from inside a Linux OS.
It is useful when bundling a Python script into a Windows .exe executable file (as a single application).
Although a Python programming environment, for example Anaconda and Spyder, are installed and operated from the Linux platform, to work with Python in Wine you must have a separate Python installation in place.
so, when you have created a Python application in Spyder (Linux), and you want to use wine to bundle it for a Windows application, you must make sure that the modules that the app calls on are also installed in the Windows environment. Having them in the Linux install is not enough, as the two Pythons are independent of each other.
So:
- Open a new terminal
- type "wine" to enter the wine environment:
- pip should be installed as a part of the Python install. There are now two commands that will use pip to install the missing module. IUf, for example, you are installing tkinter, either:
To install the Python package, you type:Note that in this instance, I have already installed Tkinter, hence the message "already satisfied". ALSO note that despite making the query in Wine, it defaults to the LINUX distribution, NOT the Wine. How do I know? To install Python for a Windows environment, I downloaded the distribution direct from the Python site, and it sits as a .exe file:
No comments:
Post a Comment