【发布时间】:2021-12-23 04:04:14
【问题描述】:
我在尝试使用pip install 时收到ImportError: cannot import name 'Literal' from 'typing' 错误消息。有人可以帮忙吗?
【问题讨论】:
-
您使用哪个 Python 版本? typing.Literal 可从 Python 3.8 获得。
-
您好,欢迎您。可能是您的 python 和 pip 版本已过时。正如@balrundev 所说,您可能需要将其更新到 Python 3.8 或更高版本。
-
我使用的是 3.9.0
-
你安装了多个python版本吗?
-
是的,2.7、3.8.0 和 3.9.0
标签: python shell command-line command