On Freitag, 20. Juli 2018 18:16:10 CEST ejm wrote:

> When I place the same Perl code in the codebase that it will execute in, run
> by Apache, the method py_eval, called from the load method in
> Inline::Python, fails to find the python module.  Adding a declaration of
> PYTHONPATH in the Perl code to include the directory where the python
> module is located did no good.

That's probably because Python and Perl don't share a view of the environment 
variables, i.e. when you set the environment variable in Perl, Python has 
already read it and set up it's library search paths. So either you make sure 
that Apache runs with that environment variable set and forwards it to your 
Perl script, or you could try setting the variable in a BEGIN block before 
ever loading Inline::Python.

Cheers,
Stefan

Reply via email to