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
 All Forums
 Origin Forum for Programming
 Forum for Python
 Install python dependencies via OPX file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
dat422 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
2   L A T E S T    R E P L I E S    (Newest First)
dat422 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
minimax 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.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000