How to build .exe from the Python project? - linux

I need to deploy my python 3 app as .exe for Windows. I'm working on linux. I have tried PyInstaller, but it seems that I have to run it from the Windows to make valid .exe. I do have access to Windows, but I would like to use it to test that my .exe is working rather than to build it.
Also is it possible to create this exe using GitLab CI?

In general, you could try to use wine in order to use windows tooling on a Linux box.
But I think this is really the wrong approach: the natural deployment option for python ... are python modules. So, instead of wasting (?) your time building one-platform-exe files ... learn how to create proper Python modules, and deploy your app using your own module.
See here for some first reading on python modules on Windows.

Related

Is it possible to use my own Python interpreter with Conda's OpenCV python library?

I work on a Python project that in one place callse Julia's code, and in other uses OpenCV.
Unfortunately, pyJulia prefers Python interpreter to be dynamically linked to the libpython. (I know I can build a custom Julia system image, but I fear the build delays when I want to test a development version of my Julia code from Python.)
What has worked so far, is using Spack instead of Conda. Python built by Spack has a shared libpython and Spack's repository does include a recent opencv.
Unfortunately, contrary to Conda, Spack is designed around a paradigm of compiling everything, rather than downloading binaries. The installation time of opencv is well over 1 hour, which barely is acceptable for a one-off install in the development environment, but is dismayingly long to build a Docker image.
So I have a thought: maybe it is possible to integrate my own Python with the rest of the Conda ecosystem?
This isn't a full solution, but Spack does support binary packages, as well as GitLab build pipelines to build them in parallel and keep them updated. What it does not have (yet) is a public binary mirror, so that you could install these things very quickly from pre-existing builds. That's in the works.
So, if you like the Spack approach, you can set up your own binary caches and automated builds for your dev environment.
I am not sure what the solution would be with Conda. You could make your own conda-forge packages, but I think if you deviate from the standard ones, you may end up reimplementing a lot of packages to support your use case. On the other hand, they may accept patches to make your particular configuration work.

How to release an application in production mode using pycharm?

I try to make an appliction using python and tkinter. At the moment I have couple of .py files where I intregated those .py files in my main UI python file or module.
I want to release this application in production mode using pycharm. What is the best way to do that? Is there any facility to create a Windows installable app?

what is process of deploying easygui application?

can we deploy 'easygui' application?
If so, how?
I have done a simple easy GUI application using Python 3.6
Now I want to create a setup file for the same.
I got a nice explanation from zadacka, when I contacted him on Github. A standard way to deploy is setuptools. There are a lot of ways of doing the deployment. Within the python world, setuptools is the successor to distutils, and the wheel packaging system is the successor to the egg.
For converting a .py file to a .exe
You can use any of the below 3 tools.
They have their own website with nice documentation.
py2exe
cx_Freeze
pyinstaller
these are used to generate a .exe file.
We need tools like Windows Installation wizard / Microsoft Installation wizard.
The one which was most suggested is Inno setup it is also a free tool.

Deploy Python Command-Line Application

So I wrote a little Command-Line App and want to provide an easy way to clone and use it. Problem: My app has some dependencies like Hashlib and Pyperclip.
Is there a best practice to get missing packages installed on a different machine?
Can I do so without people needing to install global pip packages?
It is a good idea to ship it as a venv?
Can like compile them into a single python file (somewhat like a binary)?
If I cannot do so, how to I get packages installed on a different machine?
Is there a nice routine to allow the user to completely remove my app once installed?
You could use the py2exe module to make a standalone application for the Windows platform. You can use py2app to make standalone apps on the Mac platform. For Linux, you should prepare a package using the .deb format to target the Ubuntu/Debian environment (which is one of the most popular flavors of *nix). Each other *nix flavor has its own packaging system that you would have to follow to target it as a platform.

Installation of python 3.4

I have installed Python 3.4 on my windows 7 64bit system and it runs OK with eclipse. But I am trying to install kivy or pyQT and I get a message that Python 3.4 is not installed on my system. I am totally new to python and all its modules. What can I do to correct this problem? I need a GUI but I think that first I need to make sure that Python is properly install. I hope this questionis not too basic and that I am asking on the right place.
I can't help with PyQT, and possibly this should have been two separate questions. But for Kivy the easiest way to get started is to download the portable package, which includes Python, Kivy, and all the dependencies compiled and ready to go. You can read the instructions for using the portable package here: http://kivy.org/docs/installation/installation-windows.html
If you really want to install Kivy yourself into an existing Python install, you can follow these instructions instead: https://github.com/kivy/kivy/wiki/Using-Kivy-with-an-existing-Python-installation-on-Windows-%2864-or-32-bit%29
Finally, to set up your IDE for use with the Kivy portable package (if necessary): https://github.com/kivy/kivy/wiki/Setting-Up-Kivy-with-various-popular-IDE%27s
Oh, one last caveat: we are working on Python 3 support, and Kivy will run perfectly in Python 3, but packaging is another matter. There are working packaging solutions for Windows apps using Python 3, but if you intend to deploy your app to Android or iOS you currently must use Python 2.

Resources