1

UPDATE 1: PIL and RDKIT produced import errors because the .dll files were not placed in /venv//Lib/site-packages

I removed both packages from environment and commented out their code from my project.

Next I updated the base base environment:

conda update conda #from base env

Then I upgraded pip and setuptools and reinstalled pillow:

python -m pip install pip --upgrade
pip install setuptools --upgrade
pip install pillow

I can now add my PIL content back to the project and it will work just fine on the production server, without rdkit installed.

RDKIT is only available as a conda install, it still does not install properly and breaks PIL in the process(rdkit depends on pillow). I have reinstalled from both the rdkit and conda-forge channels. Neither work.

What is the proper way to fix this problem? I feel like the hack around of moving .dll files is risky and not a good solution.

UPDATE 0: RDKIT will not load into any server

I created a basic django project similar to what you would find in the tutorial with no static files. The project successfully published to the Apache server describe below in the original post and in Windows 10 IIS. Next modified the models.py to import rdkit and both servers gave the import error and the site would not display.

Original post:

RDKIT is the only package not loading into our production server.

We successfully set up a Wampserver to run Apache and host our Django project . . .but have to comment out all the code associated with rdkit for it to work. This inhibits many required features.

There were no issues using rdkit in Django's test server.

Primary wsgi error:

from .rdBase import rdkitVersion as __version__\r, referer: http://localhost/APP/

ImportError: DLL load failed: The specified module could not be found.\r, referer: http://localhost/APP/

Relevant packages and version details:

Windows 10

Django 2.2

Python 3.7

conda 4.8.2

rdkit 2019.09.3 conda-forge

Wampserver 3.2

Apache 2.4.41

mod-wsgi 4.7.1

postgresql 10

The methods in this blog describe how we setup the production server. With one minor change, we did not alter the httpd_vhosts.conf file and only setup the standard localhost.

The error is reproducible by trying to import rdkit(or one of its methods) into any file needed to host a web application in the described environment.

We found this 2016 thread on the rdkit sourceforge and it sounds like someone else was having a similar problem on a Linux system. This is our first time setting up a server and we have not been successful at translating the recommended fix from linux to windows. There was no follow up to know if the recommendation was attempted let alone successful.

These 2012 slides lend us to believe someone was trying to overcome a similar issue in linux (slide 9)

How would a package need to be altered to allow it to load into a webserver?

Thank you, we greatly appreciate your time and assistance.

dpoiesz
  • 113
  • 1
  • 8
  • It may seem like a small point but WAMPServer is not really designed to be a LIVE server – RiggsFolly Apr 07 '20 at 21:32
  • Thank you for pointing that out @RiggsFolly. I was able to set up Windows IIS with the same results and have updated the post. – dpoiesz Apr 09 '20 at 18:15

0 Answers0