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 'Literal' from 'typing' (/usr/lib/python3.7/typing.py) #2340

Closed
ayezegel opened this issue Oct 8, 2021 · 1 comment
Labels

Comments

@ayezegel
Copy link

ayezegel commented Oct 8, 2021

Running the following code, which used to work on Colab smoothly, began to trigger an error starting on 10/07/2021:

!pip install calcbench-api-client
import calcbench as cb

The error is as follows

ImportError                               Traceback (most recent call last)
<ipython-input-5-abd77c751d2a> in <module>()
      1 get_ipython().system('pip install calcbench-api-client')
----> 2 import calcbench as cb

1 frames
/usr/local/lib/python3.7/dist-packages/calcbench/dimensional.py in <module>()
      1 from dataclasses import dataclass
      2 from enum import Enum
----> 3 from typing import Callable, Dict, Literal, Sequence, Union
      4 
      5 import pandas as pd

ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)

I would appreciate any advice on how to resolve this issue.
Note: I am using Google Chrome.

@ayezegel ayezegel added the bug label Oct 8, 2021
@craigcitro
Copy link
Contributor

typing.Literal was introduced in python 3.8: https://docs.python.org/3/library/typing.html#typing.Literal

duplicate of #1880

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants