Author |
Topic |
|
dat422
Germany
2 Posts |
Posted - 11/29/2023 : 09:23:14 AM
|
Hello everyone,
I have created a Python app and would like to distribute it via an OPX file.
My goal is that the user who installs the OPX file does not have to install the required Python packages manually. They should be installed automatically during the OPX installation.
I have almost achieved this by adding the pip install ... in the LabTalk Script Pre install section:
And exit; in the Post install section:
Unfortunately, this only closes Origin, but not the command prompt that was opened during the installation of the packages.
Does anyone have any idea how I can achieve this?
Also, is there any way to install the OPX file using powershell/command line?
Thank you for your help, David
Version: OriginPro 2023b (64-bit) SR1 Operating system: Windows 10 Enterprise |
|
minimax
348 Posts |
Posted - 12/04/2023 : 04:39:35 AM
|
Hi dat422,
You can use switch "-w", like
pip -w install numpy;
But without the command prompt, users may not know if the package is installed successfully or not. |
|
|
dat422
Germany
2 Posts |
Posted - 12/04/2023 : 11:34:44 AM
|
Hi minimax,
Thanks a lot, that was exactly what I was looking for.
I know, it is not fail safe but I use a if statement: if (Python.chk.. post install to make sure that the packages were installed successfully.
Kind regards, David |
|
|
|
Topic |
|
|
|