import torch -- AttributeError: module ‘typing‘ has no attribute ‘

import torch -- AttributeError: module ‘typing‘ has no attribute ‘,第1张

python 3.6 + pytorch1.7.1/pytorch1.7.1
出现问题:
File “/home/spl/software/anaconda3/envs/handmesh/lib/python3.6/site-packages/typing_extensions.py”, line 159, in
class _FinalForm(typing._SpecialForm, _root=True):
AttributeError: module ‘typing’ has no attribute ‘_SpecialForm’

解决方法:

  1. 使用 python 3.8 及以上版本 + pytorch 1.7.1/ pytorch1.7.0
  2. pip install typing-extensions==3.7.4.3 //更换 typing-extensions 文件的版本

=== 强烈不推荐 python 3.6 加 pytorch 1.7 我吐了 …

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/740417.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-04-28
下一篇2022-04-28

发表评论

登录后才能评论

评论列表(0条)

    保存