Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'tmap.core'; 'tmap' is not a package #31

Open
liudongliangHI opened this issue Jul 12, 2022 · 4 comments

Comments

@liudongliangHI
Copy link

When I try to import Faerun, I find a bug.

Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 8.4.0
Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)] on win32
from faerun import Faerun
Traceback (most recent call last):
  File "C:\Users\liu\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3398, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-f83fed409234>", line 1, in <cell line: 1>
    from faerun import Faerun
  File "C:\Program Files\JetBrains\PyCharm 2021.3.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\liu\anaconda3\lib\site-packages\faerun\__init__.py", line 4, in <module>
    from .plot import FaerunPlot
  File "C:\Program Files\JetBrains\PyCharm 2021.3.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\liu\anaconda3\lib\site-packages\faerun\plot.py", line 3, in <module>
    from tmap.core import TMAPEmbedding
  File "C:\Program Files\JetBrains\PyCharm 2021.3.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'tmap.core'; 'tmap' is not a package

This seems to be caused by a wrong import of your latest version, from tmap.core import TMAPEmbedding,
I don't understand why this was inported, tmap seems to have no core or TMAPEmbedding.

I solved by downgrading to 0.4.0.
pip install faerun==0.4.0

However, I think you should fix this bug.
Thanks.

@meddwl
Copy link

meddwl commented Jul 31, 2022

I installed tmap==1.2 and faerun==0.4.0 without any problems.
But I got next error

      4     dims = 512
----> 5     lf = tm.LSHForest(dims, 128, store=True)
      6 

AttributeError: module 'tmap' has no attribute 'LSHForest'

What is wrong? How can I fix it?

@daenuprobst
Copy link
Member

Hi @liudongliangHI, thanks for the info. I bumped faerun-python to version 0.4.2. This bug is now fixed. I introduced the bug because I'm testing a pip installable version of tmap (https://pypi.org/project/tmap-viz/).

@daenuprobst
Copy link
Member

Hey @meddwl, it's a bit tricky to say--it looks like the package didn't install correctly, could you share more details on how you install it? Did you use:

conda -n tmap-env -c tmap tmap

Alternatively, you could try it with the new "beta" pip package:

pip install tmap-viz

@liudongliangHI
Copy link
Author

I installed tmap==1.2 and faerun==0.4.0 without any problems. But I got next error

      4     dims = 512
----> 5     lf = tm.LSHForest(dims, 128, store=True)
      6 

AttributeError: module 'tmap' has no attribute 'LSHForest'

What is wrong? How can I fix it?

I have also found this problem before, and it seems that it can be solved by updating to the latest version.

pip install tmap-viz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants