Skip to content
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

running nb2workflow fails on python 3.12 #113

Closed
okolo opened this issue Oct 9, 2023 · 4 comments · Fixed by #114 or #115
Closed

running nb2workflow fails on python 3.12 #113

okolo opened this issue Oct 9, 2023 · 4 comments · Fixed by #114 or #115
Assignees

Comments

@okolo
Copy link
Contributor

okolo commented Oct 9, 2023

nbadapter.py uses papermill module which seem to fail on python 3.12:

from nb2workflow.service import main
Traceback (most recent call last):
File "", line 1, in
File "/opt/conda/lib/python3.12/site-packages/nb2workflow/service.py", line 13, in
from nb2workflow import ontology, publish, schedule
File "/opt/conda/lib/python3.12/site-packages/nb2workflow/ontology.py", line 6, in
import nb2workflow.nbadapter as nbadapter
File "/opt/conda/lib/python3.12/site-packages/nb2workflow/nbadapter.py", line 21, in
import papermill as pm
File "/opt/conda/lib/python3.12/site-packages/papermill/init.py", line 3, in
from .exceptions import PapermillException, PapermillExecutionError
File "/opt/conda/lib/python3.12/site-packages/papermill/exceptions.py", line 3, in
from ansiwrap import strip_color
File "/opt/conda/lib/python3.12/site-packages/ansiwrap/init.py", line 1, in
from .core import *
File "/opt/conda/lib/python3.12/site-packages/ansiwrap/core.py", line 6, in
import imp
ModuleNotFoundError: No module named 'imp'

@okolo
Copy link
Contributor Author

okolo commented Oct 9, 2023

The same code works without errors on python 3.11.6

@dsavchenko
Copy link
Member

dsavchenko commented Oct 10, 2023

For the time being, I think we need to restrict the python version (we need to restrict it for nb2workflow package itself and also to ensure it's restricted in conda-based containers created by deploy.py). (I wonder why not every build is failing, though)
There is a problem installing pyarrow (which come as dependency) with pip apache/arrow#37880 (there is no prebuilt wheel available)
Even with pyarrow preinstalled with conda, I still reproduce the exception from above in a manually created environment.

So let's wait until all dependencies are adapted to 3.12
@volodymyrss your opinion?

@volodymyrss volodymyrss linked a pull request Oct 11, 2023 that will close this issue
@volodymyrss
Copy link
Member

So let's wait until all dependencies are adapted to 3.12 @volodymyrss your opinion?

yes sure

@dsavchenko
Copy link
Member

dsavchenko commented Oct 11, 2023

It's still not resolved without #115 (as it will fail in the container based on conda environment, like crbeam)
As soon as I check it live, I will request the review

@dsavchenko dsavchenko linked a pull request Oct 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants