cannot import name 'OrderedDict' from 'typing' #5412
Comments
@rattlesnakey Can you share what command/code snippet you are running that leads to this error? |
I also run into this bug while running this snippet in conda command line: |
And I sloved this by deleting |
Thanks. I solved this problem by your method. But I meet another problem: Do you know how to solve it? Any help will be appreciated. |
I solve this problem by change the python version to 3.8, you you could have a try
| |
hengyuan_blcu
|
|
***@***.***
|
签名由网易邮箱大师定制
On 09/21/2021 15:06,Yilu ***@***.***> wrote:
And I sloved this by deleting from typing import OrderedDict, and adding from collections import OrderedDict.
Thanks. I solved this problem by your method. But I meet another problem:
"StateDictType = Union[Dict[str, torch.Tensor], OrderedDict[str, torch.Tensor]]
TypeError: 'type' object is not subscriptable"
Do you know how to solve it?
Any help will be appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
@rattlesnakey Thanks. It can solve this problem. But I meet another problem: In addition, before that, I meet a problem: I solve it by degrading scikit-learn to 0.20.3, how do you solve it? Any help will be appreciated. |
This issue is being closed due to lack of activity. If you think it still needs to be addressed, please comment on this thread 👇 |
Checklist
main
branch of AllenNLP.pip freeze
.Description
Python traceback:cannot import name 'OrderedDict' from 'typing'
Related issues or possible duplicates
Environment
OS:
Python version:3.7
Output of
pip freeze
:Steps to reproduce
Example source:
The text was updated successfully, but these errors were encountered: