rytheranderson / pyfracgen

Fractal images with Python
MIT License
21 stars 1 forks source link

Installation via PyPi does not work #2

Closed jfrtunikj-ae closed 1 year ago

jfrtunikj-ae commented 1 year ago

Hi, thanks creating this very interesting repository. I was about to try out the package however when I install it via PyPi i.e. pip install pyfracgen and I try to import it I get this error:

Python 3.8.10 (default, Jun  4 2021, 15:09:15) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyfracgen as pf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jfrtunikj/python/lib/python3.8/site-packages/pyfracgen/__init__.py", line 1, in <module>
    from .buddhabrot import buddhabrot, compute_cvals
  File "/home/jfrtunikj/python/lib/python3.8/site-packages/pyfracgen/buddhabrot.py", line 7, in <module>
    from pyfracgen.mandelbrot import _mandelbrot
  File "/home/jfrtunikj/python/lib/python3.8/site-packages/pyfracgen/mandelbrot.py", line 12, in <module>
    xbound: tuple[float, float],
TypeError: 'type' object is not subscriptable

I use Python 3.8.10. Could you please assist what I am doing wrong? Thx!

rytheranderson commented 1 year ago

Ah, yeah I forgot to do from __future__ import annotations, type hints like tuple[float, float] don't work for 3.8.10. I will make the fix, in the meantime, this should work for 3.10.

rytheranderson commented 1 year ago

The latest version (0.0.10) should now work with 3.8.10, I set up a GHA to run mypy in 3.8, and that is working. Please try to reinstall from PyPi and let me know if it works.

jfrtunikj-ae commented 1 year ago

Hi, thanks a lot for the fast fix. Now it works like a charm!