简体   繁体   中英

How to install Python packages using Pip in Inno Setup

How to install Python libraries using Pip (for instance requests, jinja2, falcon etc)** in Inno Setup?

I know one method to install Python libraries using Pip in Inno Setup (just a sample code in the below):

Inno Setup file:

[Files]
FileName: "python_file.py";

python_file.py

import subprocess
subprocess.call(["pip", "install", "requests"])

May I know, is there any other way to install Python libraries using Pip in Inno Setup?

As the pip is a standalone executable, you can execute it as any other executable using the [Run] section :

[Run]
Filename: "pip.exe"; Parameters: "install requests"; StatusMsg: "Installing requests..."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM