-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Python 3.9 Support #6345
Comments
For reference, the checklist in #6332 describes the numba 0.52 and 0.53 release cycle plans. |
@mjsteinbaugh thanks for asking about this. The Numba stack, which includes llvmlite currently does not support being executed on Python 3.9. So, I have modified the title of this issue accordingly and re-phrased it as a feature request. We may, if everything goes well, support Python 3.9 with the next patch release before the end of the year. |
I should also note, that the modifications to the bytecode with Python 3.9 will mean that even if you manage to install/compile Numba and llvmlite it is unlikely that it will work correctly when used. |
OK thanks for the update @esc . I figured that was the case, and I'll stick with Python 3.8.6 for the time being. |
👍 |
FWIW, llvmlite appears to work ok with Python 3.9 (at least, the test suite passes) but the numba test suite seems to hang: https://buildd.debian.org/status/fetch.php?pkg=numba&arch=amd64&ver=0.51.2-1%2Bb1&stamp=1602743150&raw=0 |
@mwhudson thanks for testing. I've started looking at 3.9 for Numba, there's a few changes but nothing huge, I expect a fair bit Numba will still work ok. |
Is there a rough ETA for this? |
I raised this yesterday at the Numba core developer meeting (minutes). The aim is to ship a 0.52.1, which is functionally identical to 0.52.0 but with Python 3.9 support added, mid-December or before. |
I've started work on this and have discovered that due to a couple of bytecode instruction sequence changes that this is going to be a lot more work than was initially envisaged. The patch for Python 3.9 is probably going to be large and have associated risks (it needs to rewrite swathes of bytecode sequences). It is therefore the view of the core developers that this change will warrant a full new release so as to go through the full release candidate and community testing process. Unless we can figure out a way to avoid this, which is not looking likely at present, Python 3.9 support will most likely land in Numba 0.53 which will be tagged for RC early in 2021. Sorry to have to bring this news and thank you all for your understanding. Technical details: The main issues stem from some bytecode generation changes that arose as a result of: An example: def foo(a, b):
t = 10
z = (1, 2, *a, 3, t, *b, 4)
return z
print(dis.dis(foo))
print(foo((100, np.zeros(4)), (300, 400))) On Python < 3.9:
on Python 3.9:
On Python <3.9 On Python 3.9, the tuple is built via creating a list, and then extending/appending to it, and then finally using the new op-code |
I am happy to report that I just tested the installation of the the Replication info: Environment:
Installation: Test run: (Note: If you have any other suggestion to run |
Many thanks for testing and reporting back!
I think this would only have tested the tests of the test suite (I would expect to see 10 tests run by
is everything still good? |
$> python -m numba.tests
python: No module named numba.tests.__main__; 'numba.tests' is a package and cannot be directly executed |
Thanks for testing @leriomaggio @ickc IIRC the Numba test suite can be invoked with: $ python -m numba.runtests Helping to test the release candidates:All information about release candidates passing/failing the Numba test suite on various configurations is incredibly valuable, thanks to anyone who is testing. One major thing that helps with speeding up moving release candidates to final versions is hearing how well they work with your applications. Numba's own test suite is heavily tested on the Numba build farm, and whilst huge (9k+ tests), it cannot cover all the possible things you can feed a compiler as input. This is why community led testing is so important to the Numba project and something for which we (the maintainers) are hugely grateful. We're hoping to get wheels posted today/tomorrow and will update this announcement when they are live. If you want to test the release candidates on your own projects, please do follow the instructions that will be posted there and comment on the thread reporting success/failure/issues for your project! Many thanks for your help :) |
Hey @gmarkall ,
My pleasure, glad it was useful!
Yes, exactly!
So I run first:
to see how many tests were detected. I got
I then ran the test battery on both the machines:
UPDATES @esc @gmarkall @stuartarchibald Linux (w/
**Linux (w/
I can see a pattern here - at a first glance, there shouldn't be any issue introduced with latest rc on Py3.9 :) macOS (Python 3.9 and
|
Apologies for my "thinko" earlier when I incorrectly wrote down the name of the test module. :-/ |
Oh no no worries at all! I did already figured it out by looking at the test scripts ;) In the meantime, I am finishing writing down in another reply a couple of quite strange behaviours I noted (truly by chance).. |
Ok in the meantime, I found this very strange behaviour! So, I was trying to install (CASE A): Environment with In this case, the installation of Here is (an excerpt) of the error log:
Symptomps (or things I noted) Don't know if this is related or not, but I noticed a minor release mismatch between PyPi and Conda-forge repos:
Besides, installing from
which means, (CASE B): Environment with NO pre-existing In this case (not sure why I did not notice this before - but I repeated this three times and could replicate the same issue): When I run:
it correctly downloads the dependency - but I got this error while running (full output of the command report below)
So Symptomps (or, my personal impression on the matter - which means I can be completely wrong!). I believe that this issue may be somewhat related to PEP 517 and the fact that It indeed reminded me something I already experienced some months ago when I decided to slide down the rabbit hole of Python Package manager! 😄 Hope this helps! |
Do you want us to report test results and what info should we be pasting? e.g. I ran on a few different platforms and 2 of them has the following results:
Edit: Here is 2 example logs. These output should be similar to what can be obtained by (although I actually capture them after the fact so I only have the last ~2000 lines.) {
mamba create -c conda-forge -c numba -n numba-0-53 python=3.9 'numba=0.53.0rc1' cudatoolkit -y
conda activate numba-0-53
command time -v python -m numba.runtests
neofetch | sed -e "s/$USER/numba/g" -e "s/$HOSTNAME/numba/g"
conda list
} |& sed "s/\/[^\" ]*$USER/~/g" | tee numba-test-report.log numba-test-report-3650.log summaries:
|
@ickc I basically got the same, but also with |
Could everyone please direct RC testing information based on this post (this trying to keep all the information together :-) ): https://numba.discourse.group/t/helping-test-numba-0-53-0-rc/519 Summary:
For general help, usual channels:
Many thanks for your cooperation and help in testing Numba! |
At lmcinnes/pynndescent#115 (comment), @milianw asks whether it was considered to release a 0.51.3 that warns about this incompatibility. (It would have also helped me.) |
@jondo you mean, an additional runtime check in case the package does somehow get past |
@esc yes that would be great. I never saw any trouble during updating/installing numba via pip, despite the fact that I have python 3.9.1 installed:
I just uninstalled numba and reinstalled it via pip - no complaint there either. Yet it clearly doesn't work as indicated by this bug report here. |
Good day, guys! I ran numba tests and faced some errors, please see file attached for details (file contains console output). All tests were run on macos Catalina 10.15.7 (iMac 27 2017 Intel CPU) with Python 3.9.2 version and Numba 0.53.0rc1. Short results:
|
@AlexanderUp thanks for testing, any chance you could please report the results (along with Python version, NumPy version and where you got Numba from) on this discussion thread https://numba.discourse.group/t/helping-test-numba-0-53-0-rc/519/18 that's tracking RC progress. Many thanks. |
The numba stuff was resolved re: numba/numba#6345 (comment) Resolves #126
It's seems I have the same issue , is there any way to overcome this issue ? below the error message python version: Python 3.10.4 Error message: Exception in thread django-main-thread: |
@hjaffar, it seems numba may not have been installed to your python environment. Did you install python through |
yes I installed numba , my issue solve after stop and start the server again |
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
I'm seeing this warning pop up for a clean installation of numba with Python 3.9:
I can see on the
README
that these versions are currently recommended:Is Python 3.9 and llvmlite 0.34.* not supported? Pip is currently warning about wheel build failure, but numba will install.
The text was updated successfully, but these errors were encountered: