rxn4chemistry / rxnmapper

RXNMapper: Unsupervised attention-guided atom-mapping. Code complementing our Science Advances publication on "Extraction of organic chemistry grammar from unsupervised learning of chemical reactions" (https://advances.sciencemag.org/content/7/15/eabe4166).
http://rxnmapper.ai
MIT License
286 stars 68 forks source link

rxn module not present in 0.2.0 release -- ModuleNotFoundError #27

Closed JHucker closed 2 years ago

JHucker commented 2 years ago

Installing the latest rxnmapper from pypi and running the following in python:

from rxnmapper import RXNMapper

results in a module not found error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/*/projects/rxnmapper/rxnmapper/__init__.py", line 6, in <module>
    from .core import RXNMapper  # noqa
  File "/Users/*/projects/rxnmapper/rxnmapper/core.py", line 11, in <module>
    from rxn.chemutils.reaction_equation import ReactionEquation
ModuleNotFoundError: No module named 'rxn'
avaucher commented 2 years ago

Hi @JHucker,

How did you install rxnmapper exactly? In the normal case, this problem should not appear. rxnmapper has rxn-chem-utils as a dependency, which populates part of the rxn namespace package.

In any case, doing pip install rxn-chem-utils should fix your problem.

Let me know what happens 🙂

JHucker commented 2 years ago

This was a silly oversight, my apologies.

I'm using an M1 laptop, to get 0.1.4 working I had to install the dependencies separately e.g. compile scipy. I was using these same instructions again which were missing rxn-chem-utills. Definitely works with this included.

Thanks for your help, should have looked a little deeper before raising an issue!

avaucher commented 2 years ago

No problem! Glad to hear it's working 🙂