0

I am currently working on the development of a graphical interface in php for a python application involving the import of various packages such as pandas, numpy or matplotlib.pyplot.

My problem is that when I run myproject.py from the php script (using exec, system or shell_exec) I get an error specifying "no module named 'pandas'" while out of my localhost the import of the packages is done without worry.

(I work under windows)

I wonder if this kind of request between web language and system language is possible.

Any advice, ideas, courses, indications, exemples or other help are welcome.

Sincerely,

HM.

  • Check if this (https://stackoverflow.com/questions/58627223/python-no-module-named-when-script-is-executed-by-php-with-shell-exec) helps. You're probably running into one of the issues described there (invoking a python binary without those modules most likely). – nitrin0 Jun 18 '21 at 09:18
  • I don't quite understand your problem but you might want to check out recipe ```10.11. Loading Modules from a Remote Machine Using Import Hooks``` in Python Cookbook by Beazley and Jones – NNN Jun 18 '21 at 09:19
  • Thank you for your answers! I already knew about this stackoverflow question but the user uses linux. It seems to work differently. nitrin0 I didn't know this python manual I will go through it! @Nachiket – Achille Masson Jun 18 '21 at 09:28

0 Answers0