azogue / psychrochart

A Python 3 library to make psychrometric charts and overlay information on them.
MIT License
99 stars 26 forks source link

Error under environment with numba installed #55

Closed MWaltre closed 3 months ago

MWaltre commented 3 months ago

I tried to install psychrochart for test. However, it seems not compatible with the base environment of anaconda. The anaconda version used is Anaconda3-2024.02-1-Windows-x86_64 Python version is 3.11.7 When the follow code was tested

from psychrochart import PsychroChart
import matplotlib.pyplot as plt

PsychroChart.create().plot(ax=plt.gca())
plt.show()

Error raised as

image

I created a new clean environment of python 3.10. The test code was successfully executed. Therefore, I think it is the problem of numba installed in the base environment of anaconda. Could this problem be fixed for environment with nubma installed or there is some tricks? Thank you.

azogue commented 3 months ago

Hi @MWaltre, the screenshot is kind of fuzzy 🥲, but it appears to be an issue with the library to make the psychrometric calculations (https://github.com/psychrometrics/psychrolib), which claims to be compatible with numba in the README; you should investigate there, and open an issue if necessary.

Here there is no support (or need) for numba, as this library is intended to make just plots, with usually very few calculated points.

For calculations over big arrays, where performance could be a problem, and numba may help, the better approach would be to call and operate directly with psychrolib, avoiding this wrapper library.

But if you're in for the plots, maybe you just don't need numba installed in that anaconda env ¿?

Anyway, this issue isn't related to the library, so I'll close it 👍

MWaltre commented 3 months ago

Yes, I think you are right. Thank you.