The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 Install python dependencies via OPX file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dat422

Germany
2 Posts

Posted - 11/29/2023 :  09:23:14 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

dat422

Germany
2 Posts

Posted - 12/04/2023 :  11:34:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000