OmicsML / dance

DANCE: a deep learning library and benchmark platform for single-cell analysis
https://pydance.readthedocs.io
BSD 2-Clause "Simplified" License
344 stars 33 forks source link

ImportError when directly running the code in the terminal #435

Closed pujing0215 closed 4 months ago

pujing0215 commented 4 months ago
(base) [zhan2210@gateway-03 ~]$ conda activate dance-env
(dance-env) [zhan2210@gateway-03 ~]$ export LD_LIBRARY_PATH=/mnt/home/zhan2210/
ENTER/lib: $LD_LIBRARY_PATH
(dance-env) [zhan2210@gateway-03 ~]$ python
Python 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:53:32) [GCC 12
.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dance.datasets.multimodality import Joint EmbeddingNIPSDataset
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/ufs18/home-249/zhan2210/dance/dance/datasets/__init__.py", line 1,
in <module>
from dance.datasets.multimodality import JointEmbeddingNIPSDataset, Modalit
yMatchingDataset, ModalityPrediction Dataset
File "/mnt/ufs18/home-249/zhan2210/dance/dance/datasets/multimodality.py", li
ne 12, in <module>
from dance import logger
ImportError: cannot import name 'logger' from 'dance' (unknown location)
>>>
wehos commented 4 months ago

You are running python in the path ~. There is a folder in the current path, i.e., ~/dance, which has a higher priority than dance package and overwrites the right 'dance' you are trying to load. Please switch to a different folder and try again.