Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

python 3.7 compatability #54

Open
shimwell opened this issue Dec 9, 2021 · 0 comments
Open

python 3.7 compatability #54

shimwell opened this issue Dec 9, 2021 · 0 comments

Comments

@shimwell
Copy link
Member

shimwell commented Dec 9, 2021

running in python 3.7 brings up this error

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-11-86f9c5199754> in <module>
----> 1 from cad_to_h5m import cad_to_h5m
      2 
      3 cad_to_h5m(
      4     files_with_tags=[
      5         {'cad_filename':'plasma.stp', 'material_tag':'mat_plasma'},

/opt/conda/lib/python3.7/site-packages/cad_to_h5m/__init__.py in <module>
----> 1 from .core import cad_to_h5m

/opt/conda/lib/python3.7/site-packages/cad_to_h5m/core.py in <module>
      2 import os
      3 import json
----> 4 from typing import Dict, List, TypedDict, Optional
      5 from pathlib import Path
      6 

ImportError: cannot import name 'TypedDict' from 'typing' (/opt/conda/lib/python3.7/typing.py)

possible fix is

import sys

if sys.version_info >= (3, 8):
    from typing import TypedDict, Literal, overload  # pylint: disable=no-name-in-module
else:
    from typing_extensions import TypedDict, Literal, overload
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant