Skip to content

Install issues , transformer module, involves pandas #96

@DocMinus

Description

@DocMinus

Is there an existing issue for this?

  • I have searched the existing issues and found nothing

Bug description

Tested two installation, following the description in README. Windows 10 and have problems with molfeat.trans, similar, yet different errors:
WSL Ubuntu 22: using mamba, and a new environment, Py3.10 the import attempt for from molfeat.trans import MoleculeTransformer leads to following error shown in error window.

Did a pip ... [all] just in case, but get the same error.

On a Windows conda with py3.10 I also get an error for Pandas, but not equally "bad", the code runs ok, but still gives error (or, well, warning) when I import.
upon from molfeat.trans import MoleculeTransformer I "only" get this:

Failed to find the pandas get_adjustment() function to patch
Failed to patch pandas - PandasTools will have limited functionality

then after the line of the example code mol_trans(data):

Failed to find the pandas get_adjustment() function to patch
Failed to patch pandas - PandasTools will have limited functionality
....multiple times...

How to reproduce the bug

WSL Windows 10 Ubuntu 22 install. Fresh conda installation, mamba ontop of that, creation of new environment, then followed the instructions here, then run the example code.
The Win10 environment: conda install (no mamba) and pip directly.

Error messages and logs

Error from WSL Ubuntu

 File "<stdin>", line 1, in <module>
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/trans/__init__.py", line 1, in <module>
    from molfeat.trans.concat import FeatConcat
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/trans/concat.py", line 15, in <module>
    from molfeat.trans.fp import FPVecTransformer
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/trans/fp.py", line 12, in <module>
    from molfeat.trans.base import MoleculeTransformer
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/trans/base.py", line 31, in <module>
    from molfeat.utils.cache import _Cache, FileCache, MPDataCache
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/utils/cache.py", line 35, in <module>
    class MolToKey:
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/molfeat/utils/cache.py", line 39, in MolToKey
    "dm.unique_id": dm.unique_id,
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/datamol/__init__.py", line 186, in __getattr__
    mod = importlib.import_module(obj_mod)
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/datamol/mol.py", line 33, in <module>
    from .convert import to_inchikey_non_standard
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/datamol/convert.py", line 15, in <module>
    from rdkit.Chem import PandasTools
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/rdkit/Chem/PandasTools.py", line 653, in <module>
    InstallPandasTools()
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/rdkit/Chem/PandasTools.py", line 622, in InstallPandasTools
    PandasPatcher.patchPandas()
  File "/home/a/mambaforge/envs/molstuff/lib/python3.10/site-packages/rdkit/Chem/PandasPatcher.py", line 263, in patchPandas
    if getattr(pandas_formats.format, get_adjustment_name) != patched_get_adjustment:
AttributeError: module 'pandas.io.formats.format' has no attribute 'get_adjustment'

Environment

Current environment
#- Molfeat version (e.g., 0.1.0):
#- PyTorch Version (e.g., 1.10.0):
#- RDKit version (e.g., 2022.09.5): 
#- scikit-learn version (e.g.,  1.2.1): 
#- OS (e.g., Linux):
#- How you installed Molfeat (`conda`, `pip`, source):

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions