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

ImportError: cannot import name '_datasets_server' from 'datasets.utils' (/root/anaconda3/envs/st2v/lib/python3.10/site-packages/datasets/utils/__init__.py) #33

Open
huanhuan414 opened this issue Apr 20, 2024 · 3 comments

Comments

@huanhuan414
Copy link

How to resolve this?

@fanjun1997
Copy link

Have you solved it? I also encountered it

@SoftologyPro
Copy link

I had this same issue. It is caused by an update to datasets from 2.18.0 (which StreamingT2V requires) to 2.19.0 (which causes the error).
Some package that StreamingT2V uses has an unversioned requirements list so datasets gets updated to the wrong unexpected newer version.
I get similar issues all the time with other systems.
https://softologyblog.wordpress.com/2023/10/10/a-plea-to-all-python-developers/
To fix it in this case you need to run these after installing the StreamingT2V requirements and your GPU version of torch.

pip uninstall -y datasets
pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts datasets==2.18.0

Then it will work again.

@theoldsong
Copy link

我遇到了同样的问题。这是由于将数据集从 2.18.0(StreamingT2V 需要)更新到 2.19.0(导致错误)所致。StreamingT2V 使用的某些软件包具有未版本化的需求列表,因此数据集会更新为错误的意外较新版本。 我在其他系统上总是遇到类似的问题。https ://softologyblog.wordpress.com/2023/10/10/a-plea-to-all-python-developers/ 要在这种情况下修复它,您需要在安装 StreamingT2V 要求和您的 GPU 版本的 torch 后运行这些。

pip uninstall -y datasets
pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts datasets==2.18.0

然后它就会再次工作。

I tried according to your method and reported an error again
"D: \ anaconda3 \ envs \ t2v \ lib \ site packages \ torchvision \ models \ detection \ anchor utilities. py: 63: UserWarning: Failed to initialize NumPy: DLL load failed while importing multiarray_umath: The specified module cannot be found. (Triggered internally at.. \ work \ csrc \ utils \ sensor num. cpp: 84.)"
device: torch.device = torch.device("cpu"),
D:\anaconda3\envs\st2v\lib\site-packages\scipy_init
.py:155: UserWarning: A NumPy version >=1.18.5 and <1.25.0 is required for this version of SciPy (detected version 2.0.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
ImportError: DLL load failed while importing_multiarray_umath: The specified module cannot be found.
Traceback (most recent call last):
File "E:\python\StreamingT2V\t2v_enhanced\gradio_demo.py", line 11, in
from t2v_enhanced.model.video_ldm import VideoLDM
File "E:\python\StreamingT2V\t2v_enhanced\model\video_ldm.py", line 4, in
import pytorch_lightning as pl
File "D:\anaconda3\envs\st2v\lib\site-packages\pytorch_lightning_init_.py", line 26, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "D:\anaconda3\envs\st2v\lib\site-packages\pytorch_lightning\callbacks_init_.py", line 14, in
from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
File "D:\anaconda3\envs\st2v\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in
from pytorch_lightning.callbacks.callback import Callback
File "D:\anaconda3\envs\st2v\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 22, in
from pytorch_lightning.utilities.types import STEP_OUTPUT
File "D:\anaconda3\envs\st2v\lib\site-packages\pytorch_lightning\utilities\types.py", line 40, in
from torchmetrics import Metric
File "D:\anaconda3\envs\st2v\lib\site-packages\torchmetrics_init_.py", line 46, in
from torchmetrics.image import ( # noqa: E402
File "D:\anaconda3\envs\st2v\lib\site-packages\torchmetrics\image_init_.py", line 26, in
from torchmetrics.image.fid import FrechetInceptionDistance # noqa: F401
File "D:\anaconda3\envs\st2v\lib\site-packages\torchmetrics\image\fid.py", line 28, in
from torch_fidelity.feature_extractor_inceptionv3 import FeatureExtractorInceptionV3
File "D:\anaconda3\envs\st2v\lib\site-packages\torch_fidelity_init_.py", line 6, in
from torch_fidelity.metric_fid import KEY_METRIC_FID
File "D:\anaconda3\envs\st2v\lib\site-packages\torch_fidelity\metric_fid.py", line 6, in
import scipy.linalg
File "D:\anaconda3\envs\st2v\lib\site-packages\scipy\linalg_init_.py", line 197, in
from ._misc import *
File "D:\anaconda3\envs\st2v\lib\site-packages\scipy\linalg_misc.py", line 3, in
from .blas import get_blas_funcs
File "D:\anaconda3\envs\st2v\lib\site-packages\scipy\linalg\blas.py", line 213, in
from scipy.linalg import _fblas
ImportError: numpy.core.multiarray failed to import”

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

4 participants