Thanks!
Unfortunately I still get the error
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.11/dist-packages/colab_kernel_launcher.py", line 37, in <module>
ColabKernelApp.launch_instance()
File "/usr/local/lib/python3.11/dist-packages/traitlets/config/application.py", line 992, in launch_instance
app.start()
File "/usr/local/lib/python3.11/dist-packages/ipykernel/kernelapp.py", line 712, in start
self.io_loop.start()
File "/usr/local/lib/python3.11/dist-packages/tornado/platform/asyncio.py", line 211, in start
self.asyncio_loop.run_forever()
File "/usr/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
self._run_once()
File "/usr/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
handle._run()
File "/usr/lib/python3.11/asyncio/events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.11/dist-packages/ipykernel/kernelbase.py", line 510, in dispatch_queue
await self.process_one()
File "/usr/local/lib/python3.11/dist-packages/ipykernel/kernelbase.py", line 499, in process_one
await dispatch(*args)
File "/usr/local/lib/python3.11/dist-packages/ipykernel/kernelbase.py", line 406, in dispatch_shell
await result
File "/usr/local/lib/python3.11/dist-packages/ipykernel/kernelbase.py", line 730, in execute_request
reply_content = await reply_content
File "/usr/local/lib/python3.11/dist-packages/ipykernel/ipkernel.py", line 383, in do_execute
res = shell.run_cell(
File "/usr/local/lib/python3.11/dist-packages/ipykernel/zmqshell.py", line 528, in run_cell
return super().run_cell(*args, **kwargs)
File "/usr/local/lib/python3.11/dist-packages/IPython/core/interactiveshell.py", line 2975, in run_cell
result = self._run_cell(
File "/usr/local/lib/python3.11/dist-packages/IPython/core/interactiveshell.py", line 3030, in _run_cell
return runner(coro)
File "/usr/local/lib/python3.11/dist-packages/IPython/core/async_helpers.py", line 78, in _pseudo_sync_runner
coro.send(None)
File "/usr/local/lib/python3.11/dist-packages/IPython/core/interactiveshell.py", line 3257, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "/usr/local/lib/python3.11/dist-packages/IPython/core/interactiveshell.py", line 3473, in run_ast_nodes
if (await self.run_code(code, result, async_=asy)):
File "/usr/local/lib/python3.11/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "/tmp/ipykernel_96/2849907256.py", line 6, in <cell line: 0>
from fastai.vision.all import *
File "/usr/local/lib/python3.11/dist-packages/fastai/vision/all.py", line 1, in <module>
from . import models
File "/usr/local/lib/python3.11/dist-packages/fastai/vision/models/__init__.py", line 1, in <module>
from . import xresnet
File "/usr/local/lib/python3.11/dist-packages/fastai/vision/models/xresnet.py", line 7, in <module>
from ...torch_basics import *
File "/usr/local/lib/python3.11/dist-packages/fastai/torch_basics.py", line 9, in <module>
from .imports import *
File "/usr/local/lib/python3.11/dist-packages/fastai/imports.py", line 5, in <module>
import multiprocessing,threading,urllib,tempfile,concurrent.futures,matplotlib,warnings,zipfile
File "/usr/local/lib/python3.11/dist-packages/matplotlib/__init__.py", line 129, in <module>
from . import _api, _version, cbook, _docstring, rcsetup
File "/usr/local/lib/python3.11/dist-packages/matplotlib/rcsetup.py", line 27, in <module>
from matplotlib.colors import Colormap, is_color_like
File "/usr/local/lib/python3.11/dist-packages/matplotlib/colors.py", line 56, in <module>
from matplotlib import _api, _cm, cbook, scale
File "/usr/local/lib/python3.11/dist-packages/matplotlib/scale.py", line 22, in <module>
from matplotlib.ticker import (
File "/usr/local/lib/python3.11/dist-packages/matplotlib/ticker.py", line 138, in <module>
from matplotlib import transforms as mtransforms
File "/usr/local/lib/python3.11/dist-packages/matplotlib/transforms.py", line 49, in <module>
from matplotlib._path import (
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
AttributeError: _ARRAY_API not found
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/tmp/ipykernel_96/2849907256.py in <cell line: 0>()
4 download_url(urls[0], dest, show_progress=False)
5
----> 6 from fastai.vision.all import *
7
8 im = Image.open(dest)
/usr/local/lib/python3.11/dist-packages/fastai/vision/all.py in <module>
----> 1 from . import models
2 from ..basics import *
3 from ..callback.all import *
4 from .augment import *
5 from .core import *
/usr/local/lib/python3.11/dist-packages/fastai/vision/models/__init__.py in <module>
----> 1 from . import xresnet
2 from . import unet
3 from .tvm import *
/usr/local/lib/python3.11/dist-packages/fastai/vision/models/xresnet.py in <module>
5 # %% ../../../nbs/11_vision.models.xresnet.ipynb 2
6 from __future__ import annotations
----> 7 from ...torch_basics import *
8 try: from torchvision.models.utils import load_state_dict_from_url
9 except ModuleNotFoundError: from torch.hub import load_state_dict_from_url
/usr/local/lib/python3.11/dist-packages/fastai/torch_basics.py in <module>
7 os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
8
----> 9 from .imports import *
10 from .torch_imports import *
11 from .torch_core import *
/usr/local/lib/python3.11/dist-packages/fastai/imports.py in <module>
3 import io,operator,sys,os,re,mimetypes,csv,itertools,json,shutil,glob,pickle,tarfile,collections
4 import hashlib,itertools,types,inspect,functools,random,time,math,bz2,typing,numbers,string
----> 5 import multiprocessing,threading,urllib,tempfile,concurrent.futures,matplotlib,warnings,zipfile
6
7 from concurrent.futures import as_completed
/usr/local/lib/python3.11/dist-packages/matplotlib/__init__.py in <module>
127 # cbook must import matplotlib only within function
128 # definitions, so it is safe to import from it here.
--> 129 from . import _api, _version, cbook, _docstring, rcsetup
130 from matplotlib.cbook import sanitize_sequence
131 from matplotlib._api import MatplotlibDeprecationWarning
/usr/local/lib/python3.11/dist-packages/matplotlib/rcsetup.py in <module>
25 from matplotlib import _api, cbook
26 from matplotlib.cbook import ls_mapper
---> 27 from matplotlib.colors import Colormap, is_color_like
28 from matplotlib._fontconfig_pattern import parse_fontconfig_pattern
29 from matplotlib._enums import JoinStyle, CapStyle
/usr/local/lib/python3.11/dist-packages/matplotlib/colors.py in <module>
54 import matplotlib as mpl
55 import numpy as np
---> 56 from matplotlib import _api, _cm, cbook, scale
57 from ._color_data import BASE_COLORS, TABLEAU_COLORS, CSS4_COLORS, XKCD_COLORS
58
/usr/local/lib/python3.11/dist-packages/matplotlib/scale.py in <module>
20 import matplotlib as mpl
21 from matplotlib import _api, _docstring
---> 22 from matplotlib.ticker import (
23 NullFormatter, ScalarFormatter, LogFormatterSciNotation, LogitFormatter,
24 NullLocator, LogLocator, AutoLocator, AutoMinorLocator,
/usr/local/lib/python3.11/dist-packages/matplotlib/ticker.py in <module>
136 import matplotlib as mpl
137 from matplotlib import _api, cbook
--> 138 from matplotlib import transforms as mtransforms
139
140 _log = logging.getLogger(__name__)
/usr/local/lib/python3.11/dist-packages/matplotlib/transforms.py in <module>
47
48 from matplotlib import _api
---> 49 from matplotlib._path import (
50 affine_transform, count_bboxes_overlapping_bbox, update_path_extents)
51 from .path import Path
ImportError: numpy.core.multiarray failed to import
But it successfully installs numpy 1.26 it seems
Collecting numpy<2
Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 2.3.2
Uninstalling numpy-2.3.2:
Successfully uninstalled numpy-2.3.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
bigframes 2.8.0 requires google-cloud-bigquery-storage<3.0.0,>=2.30.0, which is not installed.
gensim 4.3.3 requires scipy<1.14.0,>=1.7.0, but you have scipy 1.15.3 which is incompatible.
datasets 3.6.0 requires fsspec[http]<=2025.3.0,>=2023.1.0, but you have fsspec 2025.5.1 which is incompatible.
onnx 1.18.0 requires protobuf>=4.25.1, but you have protobuf 3.20.3 which is incompatible.
cesium 0.12.4 requires numpy<3.0,>=2.0, but you have numpy 1.26.4 which is incompatible.
google-colab 1.0.0 requires google-auth==2.38.0, but you have google-auth 2.40.3 which is incompatible.
google-colab 1.0.0 requires notebook==6.5.7, but you have notebook 6.5.4 which is incompatible.
google-colab 1.0.0 requires pandas==2.2.2, but you have pandas 2.2.3 which is incompatible.
google-colab 1.0.0 requires requests==2.32.3, but you have requests 2.32.4 which is incompatible.
google-colab 1.0.0 requires tornado==6.4.2, but you have tornado 6.5.1 which is incompatible.
dopamine-rl 4.1.2 requires gymnasium>=1.0.0, but you have gymnasium 0.29.0 which is incompatible.
pandas-gbq 0.29.1 requires google-api-core<3.0.0,>=2.10.2, but you have google-api-core 1.34.1 which is incompatible.
thinc 8.3.6 requires numpy<3.0.0,>=2.0.0, but you have numpy 1.26.4 which is incompatible.
imbalanced-learn 0.13.0 requires scikit-learn<2,>=1.3.2, but you have scikit-learn 1.2.2 which is incompatible.
plotnine 0.14.5 requires matplotlib>=3.8.0, but you have matplotlib 3.7.2 which is incompatible.
bigframes 2.8.0 requires google-cloud-bigquery[bqstorage,pandas]>=3.31.0, but you have google-cloud-bigquery 3.25.0 which is incompatible.
bigframes 2.8.0 requires rich<14,>=12.4.4, but you have rich 14.0.0 which is incompatible.
mlxtend 0.23.4 requires scikit-learn>=1.3.1, but you have scikit-learn 1.2.2 which is incompatible.
Successfully installed numpy-1.26.4