-
Notifications
You must be signed in to change notification settings - Fork 6
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
How to fix "ImportError: cannot import name 'dataclass'"? #1
Comments
I'm sorry that I have never met the issue you have encountered. From the error content, I think the pytorch version causes the problem. Have you correctly installed the pytorch package?
------------------ Original ------------------
From: ***@***.***>;
Date: Tue, Apr 26, 2022 02:51 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [MSNLAB/SmartEye] How to fix "ImportError: cannot import name 'dataclass'"? (Issue #1)
Excuse me, I encountered following issues when setting up edge node. Have you ever notice this problem? Thanks!
$ python3 edge_main.py -f ~/cutout1.mp4 -i 50 Traceback (most recent call last): File "edge_main.py", line 14, in <module> from local.decision_engine import DecisionEngine File "/home/htliu/SmartEye/local/decision_engine.py", line 4, in <module> from model_manager.model_cache import get_fastest_model, get_most_precise_model File "/home/htliu/SmartEye/model_manager/model_cache.py", line 3, in <module> import torch File "/home/htliu/.local/lib/python3.6/site-packages/torch/__init__.py", line 627, in <module> import torch.utils.data File "/home/htliu/.local/lib/python3.6/site-packages/torch/utils/data/__init__.py", line 6, in <module> from .dataloader import DataLoader, _DatasetKind, get_worker_info File "/home/htliu/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 21, in <module> from . import _utils File "/home/htliu/.local/lib/python3.6/site-packages/torch/utils/data/_utils/__init__.py", line 45, in <module> from . import worker, signal_handling, pin_memory, collate, fetch File "/home/htliu/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 10, in <module> from dataclasses import dataclass ImportError: cannot import name 'dataclass'
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thanks for your kindly reply! I install pytorch using the following command line I wonder whether this matters if I have no GPU with my VM. |
Using GPU or no GPU is alright. Our framework support both.
…--------------原始邮件--------------
发件人:"htliu6 ***@***.***>;
发送时间:2022年4月26日(星期二) 下午3:31
收件人:"MSNLAB/SmartEye" ***@***.***>;
抄送:"王学智 ***@***.***>;"Comment ***@***.***>;
主题:Re: [MSNLAB/SmartEye] How to fix "ImportError: cannot import name 'dataclass'"? (Issue #1)
-----------------------------------
Thanks for your kindly reply! I install pytorch using the following command line
pip install torch==1.8.0+cpu torchvision==0.9.0+cpu torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
from https://pytorch.org/get-started/previous-versions/#linux-and-windows-11, and everything gets OK when installation finished.
I wonder whether this matters if I have no GPU with my VM.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Thanks for your reply! BTW, I wonder which version of opencv-python you adopted when running this repo. Thanks! |
I used an arm achitecture computer, so the version is 3.2.0+dfsg-4build2 arm64. I do not know if this can help you.
------------------ Original ------------------
From: "htliu6";
Date: 2022年4月27日(星期三) 下午4:57
To: "MSNLAB/SmartEye";
Cc: ***@***.***>; "Comment";
Subject: Re: [MSNLAB/SmartEye] How to fix "ImportError: cannot import name 'dataclass'"? (Issue #1)
Thanks for your reply! BTW, I wonder which version of opencv-python you adopted when running this repo. Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Excuse me, I encountered following issues when setting up edge node. Have you ever notice this problem? Thanks!
The text was updated successfully, but these errors were encountered: