(Make sure your LD_LIBRARY_PATH env variable is also set to $RDBASE\lib, as
you don't list this)
In Unix and Linux environments, the issue is that the user running apache
is a system account and has no default shell or bash environment. This has
been tackled before here:
http://comments.gmane.org/gmane.science.chemistry.rdkit.user/2812
I don't know how apache behaves under Windows. If you want to check that
your environment is set up correctly create a php page with
<?php
phpinfo();
?>
Access this page and have a look at the environment section. You can see
that all the RDKit required variables are here, in my case:
EnvironmentVariableValueLD_LIBRARY_PATH/opt/RDKit_2014_03_1/lib:
APACHE_RUN_DIR/var/run/apache2APACHE_PID_FILE/var/run/apache2/apache2.pid
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APACHE_LOCK_DIR/var/lock/apache2LANGCAPACHE_RUN_USERwww-dataAPACHE_RUN_GROUP
www-dataAPACHE_LOG_DIR/var/log/apache2PWD/PYTHONPATH/opt/RDKit_2014_03_1:
-
Jean-Paul Ebejer
Early Stage Researcher
On 4 March 2015 at 11:39, Sujit Tangadpalliwar <
[email protected]> wrote:
> Dear all,
> Greetings...
>
> I am trying to execute python script from PHP (test.php) on XAMPP server.
> My python script (test.py) unable to import rdkit rdkitand showing error
> message "n import rdkit ImportError: No module named rdkit"
> when trying to run same python script from system through cmd or through
> python shell its running properly.
>
> My environmental variable are
> RDBASE: C:\RDKit_2013_09_1
> PYTHONPATH: %RDBASE%
> path: C:\RDKit_2013_09_1\lib
>
> My files look like:
> %%test.py
> print "111"
> from rdkit import Chem
> print "222"
>
> %%test.php
> <html>
> <body>
> <?php
> $result = shell_exec("C:/Python27/python.exe
> D:/Databases/XAMPP/htdocs/jsmol/PredictR/python_prog/asas.py 2>&1");
> echo $result;
> ?>
> </body>
> </html>
>
> %%output
> 111 Traceback (most recent call last): File "path/test.py", line 2, in
> import rdkit ImportError: No module named rdkit
>
> Please help me out to sort this problem
> Thanks in advance.
>
>
> --
> Warm regards
> Sujit R. Tangadpalliwar
> PhD Research Scholar,
> NIPER, Mohali.
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss