hcji / PyFingerprint

Python tool for generate fingerprints of a molecule
GNU Affero General Public License v3.0
68 stars 30 forks source link

The problems for installation #2

Closed tetrar124 closed 5 years ago

tetrar124 commented 5 years ago

Dear author,

I tried to use this library and some problems have occurred.

  1. Required library 'pip install jpype', it should be 'pip install jpype1'

  2. jar location The original location of jar, which did not work. I changed the location of cdk-2.2.jar to (python-folder)\Lib\site-packages\PyFingerprint\CDK\, and it works fine.

  3. Install problem When I installed this library, but it made a subfolder 'PyFingerprint' and I couldn't import this library. I changed the location of the subfolder to 'site-packages' directly, and it works well.

This library is very useful for chemoinformatics. Could you please check these problems?

Sincerely,

Xiangju commented 5 years ago

I encountered the same issue when installed the package. Following the instructions in the README file, I can install the package successfully, but failed to run the simple test given in the README file. I got the following error for the test example:

  File "full/path/to/python/environ/python2.7/site-packages/jpype/_jpackage.py", line 62, in __call__
    raise TypeError("Package {0} is not Callable".format(self.__name))
TypeError: Package org.openscience.cdk.fingerprint.Fingerprinter is not Callable

After googling, debuging and trying other alternative packages (e.g. cinfony), I can install package and run the testing sample successfully. I cloned the project to my computer and changed the full path for cdk-2.2.jar library to full path on my computer, after this change, everything works as expected.

Change the following line in CDK_Fingerprint.py

    cdk_path = PyFingerprint.__path__[0] + '\\CDK\\cdk-2.2.jar'
to
    cdk_path = 'full/path/to/envs/py27/cdk-2.2.jar'

Hope this helps for someone who has similar issue in the future.

hcji commented 5 years ago

the problem has been fixed.