ajwdewit / pcse

Repository for the Python Crop Simulation Environment
Other
191 stars 127 forks source link

Compatibility issue with python 3.10 #70

Closed pedroalencar1 closed 1 year ago

pedroalencar1 commented 1 year ago

I recently updated my python to 3.10 and after installing pcse with pip install pcse couldn't import.

The error is: "cannot import name 'Iterable' from 'collections'"

I looked up for the error up and found (link to SO post) Iterable from collections was deprecated and that one should use collections.abc.

Does it make sense?

Cheers,

ajwdewit commented 1 year ago

Dear Pedro,

Yes it makes sense. I will have a look at the code and fix it in the next update.

Not sure when I can do it, in the meantime downgrade to 3.9 please.

with best regards,

Allard

Op 30-01-2023 16:32 CET schreef Pedro Alencar @.***>:

I recently updated my python to 3.10 and after installing pcse with pip install pcse couldn't import.

The error is: "cannot import name 'Iterable' from 'collections'"

I looked up for the error up and found (link to SO post https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python) Iterable from collections was deprecated and that one should use collections.abc.

Does it make sense?

Cheers,

— Reply to this email directly, view it on GitHub https://github.com/ajwdewit/pcse/issues/70, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJYCNWCCVCQCGGSBVYMYEDWU7NJNANCNFSM6AAAAAAULJOLQE. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pedroalencar1 commented 1 year ago

Dear Allard,

I don't know why, but I didn't get a notification of your answer. I did downgrade to 3.9 and have been working fine with it.

Many thanks,

Pedro

ajwdewit commented 1 year ago

I pushed version 5.5.5 to PyPI that is compatible with python 3.10