aeye-lab / pymovements

A python package for processing eye movement data
https://pymovements.readthedocs.io
MIT License
57 stars 11 forks source link

ModuleNotFoundError: No module named 'typing_extensions' #679

Closed OmerShubi closed 4 months ago

OmerShubi commented 4 months ago

Current Behavior

Executing import pymovements as pm in a new environment (after running pip install -e .) fails due to missing module type-extensions.

Suggestion: Add typing_extensions as a dependency. Currently it is only an optional test dependecy.

Expected Behavior

Importing the package should not fail.

Minimum acceptance criteria

Importing the package should not fail in a newly created environment.

Failure Information (for bugs)

Steps to Reproduce

  1. git clone repo + cd
  2. conda create -n pymovements
  3. conda install pip
  4. pip install -e .
  5. Run import pymovements as pm

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Traceback (most recent call last):
  File "/data/home/shubi/pymovements/playground/10_min_tutorial.py", line 1, in <module>
    import pymovements as pm
  File "/data/home/shubi/pymovements/src/pymovements/__init__.py", line 26, in <module>
    from pymovements import plotting
  File "/data/home/shubi/pymovements/src/pymovements/plotting/__init__.py", line 35, in <module>
    from pymovements.plotting.traceplot import traceplot
  File "/data/home/shubi/pymovements/src/pymovements/plotting/traceplot.py", line 32, in <module>
    from typing_extensions import TypeAlias
ModuleNotFoundError: No module named 'typing_extensions'

Checklist

OmerShubi commented 4 months ago

I was able to reproduce this with both python 3.11 and 3.12

SiQube commented 4 months ago

I also reproduced the bug using virtualenv instead of conda

dkrako commented 4 months ago

So strange. We removed it in #460 when we dropped support for python 3.7. We must have thought that typing_extensions are part of python by default? Anyway, the issue is resolved with #684.

Thank you for reporting @OmerShubi and thanks again for resolving the issue @SiQube