Using the method listed here: How to run python script in webpage, I can use my Python script in a web page. But what if that Python script needs to have something installed with PIP? Is it possible to install things using PIP if it's not installed?
Asked
Active
Viewed 68 times
1 Answers
0
Whilst developing a web application you would identify what modules are required by your script. The convention is that they are added to a requirements.txt
file which allows the process of installing the required modules to be automated. Pip can read the file and install the correct modules.
This is something that would be done when the production server is configured.
It wouldn't be advisable to have a method to allow the web application to install it's own modules during normal operation. This is likely to be a security risk.

scotty3785
- 6,763
- 1
- 25
- 35