-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with Numba using Python 3.12 #79
Comments
I think that Numba is not compatible yet with Python 3.12 (see numba/numba#9250 and numba/numba#9197). You better keep 3.11 for now. I am not that good at using osgeo4W. @biglimp any idea how to select a specific Python version in osgeo4w ? |
How do I downgrade the Python version to 3.11?. |
Just saw that QGIS 3.36.2 comes with Python 3.12. @j3r3m1 , is it possible to adjust numba-version to be compatible with 3.12? We need to follow QGIS repo updates. I see that numba 0.59 is included in the QGIS repo but you are using 0.57. |
The version before was Python 3.9. I never downgraded Python in QGIS before but it should be possible. Go to the setup and try to change version. |
Where did you check that the numba version used in UMEP is 0.57 ? In the UMEP-reqs there are no version defined (https://github.com/UMEP-dev/umep-reqs/blob/9e1f73fb76269cce8057d52b4f60ae583a8bd441/umep-reqs/setup.py#L31). So it should install the right version directly. However, you are right, they say on the Pypi website that version 3.12 can be used with Numba 0.59. And I have reread the thread I have pointed out and it has been closed in February. So 0.59 should work but it is not installed by default. |
@Inspire71 Reading more in detail your error log, it seems it is not the last version of the umep-reqs which is used. An attempt is made to use the last one but it probably fails thus trying previous version that are saved in your cache. It seems the same problem is met in #78 (in the last message which has disappearred from GitHub...). There are probably conflicts between libraries in the last versions of QGIS that make it uses old umep-requirements. |
@Inspire71 could you please try the following:
Thank you for helping us at investigating this problem. |
No, I still have 3.9 but I can take on of my computers and update to 3.12 so that we can use is for testing. |
I have the latest version of QGIS 3.36.2-Maidenhead installed |
I have executed what you mentioned and it gives me this message: |
C:\OSGeo4W>pip install umep-reqs × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. |
Installed a 3.36.2. Got the following error trying to install umep-reqs:
|
OK thank you. No more information than what you logged before then. It just cannot manage to solve dependencies of the last umep-reqs but we cannot figure out what's wrong. Then can you try the following (individual installation of the missing libraries). In the osgeo shell you can type: pip install supy==2023.5.26.dev0
pip install numba
pip install jaydebeapi==1.2.3
pip install netCDF4 If we still meet problems we can try to replace the numba line by a specific numba number: pip install numba=0.59.1 |
This is what I got. Need to run to a meeting. Catch you later.
|
C:\OSGeo4W>pip install supy==2023.5.26.dev0 C:\OSGeo4W>pip install numba C:\OSGeo4W>pip install jaydebeapi==1.2.3 C:\OSGeo4W>pip install netCDF4 |
This is the result, I got an error with pip install supy==2023.5.26.dev0 |
Is this version OK? |
Thank you for your debug info, we will check that with @biglimp and come back to you with a solution. |
thanks a lot |
@Inspire71, we found that QGIS.org updated Python, which makes our tool not functional at the moment. We are working on a solution. |
Thanks for the help, I hope it can be resolved soon.
A. Torres
…________________________________
From: biglimp ***@***.***>
Sent: Tuesday, May 7, 2024 1:32:41 PM
To: UMEP-dev/UMEP-processing ***@***.***>
Cc: Inspire71 ***@***.***>; Mention ***@***.***>
Subject: Re: [UMEP-dev/UMEP-processing] Trouble with Numba using Python 3.12 (Issue #79)
@Inspire71<https://github.com/Inspire71>, we found that QGIS.org updated Python, which makes our tool not functional at the moment. We are working on a solution.
—
Reply to this email directly, view it on GitHub<#79 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXYJ72ERQ3WX5VDNQKGRVI3ZBC3VTAVCNFSM6AAAAABHH7JOC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGE4TCMRTGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@j3r3m1, trying to get this working but runs into numba issues on my W10 (QGIS, 3.36.3, Python 3.12). We nned to use another numba vesrion, it seems. Any suggestions? Do we need to make changes in umep-reqs?
|
Well I am not sure I can follow all dependencies we have in UMEP and SUPY but as far as I understand there are not a lot needed by Numba (https://numba.readthedocs.io/en/stable/user/installing.html#dependency-list). But for sure the dependency management should not end with the 0.56 for Numba if you have a 3.12 version of Python (see https://numba.readthedocs.io/en/stable/user/installing.html#version-support-information, at least 0.59.0 is needed). An option would be to specify Numba>=0.59.0 as it seems to work with quite a large number of Python AND numpy version. Can you have a test ? |
I manually installed numba and now it works. Strange that it wants to install numba==0.56... Looks like cashed umep-reqs is used. Any idea how to solve this or should we state numba==0.59.0 in umep-reqs maybe...? I cannot locate where these cashed umep-reqs is stored. Do you know? |
An option would be to use the "--no-cache-dir" option when using pip (cf. https://stackoverflow.com/questions/9510474/pip-uses-incorrect-cached-package-version-instead-of-the-user-specified-version). |
Otherwise using numba>=0.59.0 may make the job for most users |
Yes. I will just try using new supy version and numba=0.59 on my pc where I have Python 3.9 and see if it works. If everything is ok, we can update umep-reqs. |
@Inspire71 , I updated umep-reqs which should now work with Python 3.12. Try restarting QGIS and UMEP for Processing and see if you can get the correct libraries installed. |
@biglimp I have reinstalled the plugin directly from QGIS and I am still having the same problem, I think this plugin is not up to date. |
Originally posted by @Inspire71 in #24 (comment)
The text was updated successfully, but these errors were encountered: