KavrakiLab / EnGens

7 stars 0 forks source link

Error importing libs during Workflow 2 #22

Closed vcbl123 closed 8 months ago

vcbl123 commented 8 months ago

Hello,

I am trying to use EnGens via conda installation but during the first step of the Workflow 2 I receive the following error message while importing the required libs:

ModuleNotFoundError Traceback (most recent call last)

in 1 #required imports 2 from engens.core.EnGens import EnGen ----> 3 from engens.core.DimReduction import * 4 import pickle as pk 5 import mdtraj ~/anaconda3/envs/engens/lib/python3.6/site-packages/engens/core/DimReduction.py in 8 from math import sqrt 9 import tensorflow as tf ---> 10 import umap 11 import tqdm 12 ~/anaconda3/envs/engens/lib/python3.6/site-packages/umap/__init__.py in 34 import numba 35 ---> 36 from importlib.metadata import version, PackageNotFoundError 37 38 try: ModuleNotFoundError: No module named 'importlib.metadata'

Is this a common issue? Is there a known fix to this?

AnjaConev commented 8 months ago

Hi, thank you for using EnGens and thank you for reporting this issue! 😸

I was able to reproduce the issue - it seems to be due to be related to the versions of packages not being compatible. In particular, the recent release (0.5.5) of the umap package includes a dependency on importlib.metadata that is incompatible with some of our packages. I will look further into this to better understand how to make our code compatible with umap 0.5.5.

For now a quick fix is to specify the woeking version of umap - that is 0.5.3. You can activate the conda environment you installed. And install umap-learn==0.5.3

conda activate engens
pip install umap-learn==0.5.3

In addition, I will update the environment.yml files for future conda installs.

Please let us know if the fix worked and if you come across any other issues.

vcbl123 commented 8 months ago

The fix worked!

Thanks for the help.