How to run python code by anaconda prompt with php?

Asked

Viewed 397 times

0

Staff follows description for understanding:

1 - I have the code of a classifier written in python

2 - I want to run it from php (shell_exec() for example) but not using the windows prompt but anaconda prompt since, running python from the windows prompt is not identified some libraries installed by anaconda prompt like numpy, Keras... etc.

  1. This was the solution I thought, basically run python code from php using anaconda prompt. I’ve searched but couldn’t find a solution.

I’m open to new suggestions to perform this task, since I’m a layman and I don’t know a way to do it.

  • Why you need to run from PHP?

1 answer

0

I believe your problem is quite similar in running a prompt that is not the default Windows prompt, you can run the prompt similar to powershell running in the example below, replace it with the anaconda path and add the parameters that anaconda accepts.

Reference:

Run a Powershell script from PHP

Browser other questions tagged

You are not signed in. Login or sign up in order to post.