install python using GUI pyqt - pyqt

is it possible to develop a pyqt application and check if python is installed, if not can we install python from the same application?
i need to install python through a pyqt standalone application(exe).
when i double click on the exe it should download python and install.

Yes, this is possible. You will need to do the following:
Develop the code on a computer with Python and PyQt, convert the python code into a executable (.exe) file (if you would like to deploy to windows)
Send this .exe file to the user computer and then run it there

Related

I download the program python on my windows for the first time

I downloaded the python of the homepage when I open it it keeps taking me to the Play Store and asking if what app do I want to open the program with, my computer application is in Windows 10 . anybody have the same problem? I cannot open that type of Anaconda
if you're trying to install python in windows, you can navigate to https://www.python.org/ > Downloads > Download for Windows
It will download the python.exe file which you can use to install.
Double click on the exe file, and you will see the python basic editor.

How to run GTK3 Python3 script outside of MSYS2 in Windows

How can I make my GTK3+ Python script work outside of Msys2's own Python interpreter, into my own venv (virtual environment) Python3 interpreter? I want to prepare my Python 3 script for distribution to other computers, but without Msys2.
I'm using Windows 10.
I've successfully followed the instructions on GTK's website, to download GTK3+ and the Python bindings, in Windows.
I've installed GTK3+ and the Python bindings using MSYS2. My script runs successfully within MSYS2's Python3 interpreter in C:\msys64\mingw64\bin. However, I want to run my Python script outside of MSYS2, with a separate Python 3 interpreter (venv) - not the one in MSYS2.
From my research, it seems that I need to copy the GTK3 .dll files and icons from
C:\msys64\mingw64\bin
and C:\msys64\mingw64\share
to the Python3 interpreter path that I want, with my script files in there too.
But when I attempt to run my script in the virtual environment, I get:
builtins.ImportError: cannot import name '_gi' from 'gi'
Any ideas? Thanks.
I don't know if that is possible.
But if the final intent is to distribute your app, then you should install PyInstaller inside MSYS2 and generate an executable there. Then you'll be able to distribute and execute your app on any Windows machine.
It will only be possible to run your program using the MSYS2 Python interpreter and with all of the required libraries. You can't just copy files and then run them with the Windows Python interpreter that was built using MSVC.
PyInstaller is a good solution to package an app with the interpreter and all of the libraries. The issue you mentioned about getting errors about no module named '_struct' has been fixed.

Running a standalone exe made from python 3.5 in windows xp

We created a python program with tensorflow in python 3.5. Based on our research python 3.5 and tensorflow are not supported in xp. But if we converted it to an exe file using cx_freeze, will it work?
The situation won't be any different if you use cx_freeze. There's still the same Python interpreter (just without the interactive shell), and the same libraries (packaged more conveniently), and your scripts (in the form of .pyc files, i.e. Python bytecode). The .exe file you see there just initializes the interpreter (which resides in a dll) and commands it to execute your script.

Run python on Linux without python installed

Currently I'm using cx_Freeze to turn .py into .exe and this works fine with modules and everything, but I can't find any way to make it so it could run in Linux.
Is there any alternative for making it be able to run on Linux? Using something else other than cx_Freeze is fine.
Is there any way to compile it for Linux, while on Windows
From the docs
cx_Freeze works on Windows, Mac and Linux, but on each platform it only makes an executable that runs on that platform. So if you want to freeze your program for Windows, freeze it on Windows; if you want to run it on Macs, freeze it on a Mac.
You should try pyinstaller.
It supports creation of self-encapsulated python executables that work even when the python runtime is not installed.

Launch Labview program through Python

I am working on a project in which I have to launch a VI (Labview program) through my GUI written in python. I have not the administrator rights so I installed PyCharm Community with the JetBrain Toolbox and Python 3.3 with an MSI file.
I read on the internet that to do what I want, I need to install the pywin32 extension: extension -link, but when I launch it, it doesn't find my Python installation.
So, my question is: is there another way to control VI from python?
Thank you in advance for your answer. I am a beginner in both languages.
If you want to run a plain VI, you have to run the LabVIEW IDE -- a
VI is a source code file, not a built executable, so to run directly,
it has to be hosted in the editor.
If you want to run a VI built into
an executable, you obviously have to run that built EXE.
So, either way, you're going to have to be able to launch an EXE.
Can your Python invoke C-style DLLs? If so, you could build your VI into a DLL and then call the VI that way.

Resources