Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ImportError: cannot import name 'final' from 'typing'

Microsoft Windows [Version 10.0.19045.3086]
(c) Microsoft Corporation. All rights reserved.

C:\Users\user>cd C:\Users\user\Desktop\xolo-sniper-recode-main

C:\Users\user\Desktop\xolo-sniper-recode-main>python main.py
Traceback (most recent call last):
File "main.py", line 1, in
from typing import final
ImportError: cannot import name ‘final’ from ‘typing’ (C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\typing.py)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

C:\Users\user\Desktop\xolo-sniper-recode-main>

i am trying to run a python file named main

>Solution :

final was added in Python 3.8. You can see this in the documentation underneath the text describing its usage. You can either upgrade your Python interpreter to 3.8+ or you can omit final.

You may find it helpful to switch the documentation version at the top of the page to 3.7 so that it doesn’t show features that you can’t use in Python 3.7.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading