fathomnet / fathomnet-py

FathomNet Python client
https://fathomnet-py.readthedocs.io
MIT License
24 stars 3 forks source link

Errors when using fathomnet with python 3.8 #13

Closed mi2celis closed 2 years ago

mi2celis commented 2 years ago

My laptop is running Ubuntu 20.04 with python 3.8.10

I installed fathomnet by: python -m pip install fathomnet

When I try to use it I get the following errors:

% python Python 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from fathomnet.api import boundingboxes Traceback (most recent call last): File "", line 1, in File "/home/mimi/.local/lib/python3.8/site-packages/fathomnet/api/boundingboxes.py", line 4, in from .. import models File "/home/mimi/.local/lib/python3.8/site-packages/fathomnet/models.py", line 3, in from dataclasses_json import dataclass_json File "/home/mimi/.local/lib/python3.8/site-packages/dataclasses_json/init.py", line 2, in from dataclasses_json.api import (DataClassJsonMixin, File "/home/mimi/.local/lib/python3.8/site-packages/dataclasses_json/api.py", line 7, in from dataclasses_json.core import (Json, _ExtendedEncoder, _asdict, File "/home/mimi/.local/lib/python3.8/site-packages/dataclasses_json/core.py", line 17, in from typing_inspect import is_union_type # type: ignore File "/home/mimi/.local/lib/python3.8/site-packages/typing_inspect.py", line 17, in from typing_extensions import _TypedDictMeta as _TypedDictMeta_TE ImportError: cannot import name '_TypedDictMeta' from 'typing_extensions' (/usr/lib/python3/dist-packages/typing_extensions.py)

Any ideas on what is going on? Thank you

mi2celis commented 2 years ago

If I create a virtual environment with python 3.7, fathomnet works without errors. Seems to be am issue with python 3.8

kevinsbarnard commented 2 years ago

Hi @mi2celis, I just tested the python -m pip install fathomnet command on a fresh 3.8.10 environment, and it seems to run okay on all platforms. My guess is that you have an outdated typing-extensions package version installed. I recommend running

pip install --upgrade typing-extensions

to ensure you have the latest version.