Import Cupy throws AttributeError on 'numpy'

Hi, all. I’m new to this environment. Apologize in advance if I’m posting in the wrong area and just LMK where the correct area to post.

I thought to write a simple python code using Cupy. I installed cupy-cuda11x (v12.1.0) and numpy (v1.24.3) on my Nvidia Jetson AGX Xavier. When I run “import cupy as cp” on python command line, the following is displayed:
nvidia@nvidia-desktop:~$ python
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import cupy as cp
Traceback (most recent call last):
File “”, line 1, in
File “/home/nvidia/.local/lib/python3.8/site-packages/cupy/init.py”, line 31, in
import cupyx as _cupyx # NOQA
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/init.py”, line 8, in
from cupyx import linalg # NOQA
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/linalg/init.py”, line 2, in
from cupyx.linalg import sparse # NOQA
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/linalg/sparse/init.py”, line 3, in
from cupyx.linalg.sparse._solve import lschol # NOQA
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/linalg/sparse/_solve.py”, line 7, in
from cupyx.scipy import sparse
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/scipy/init.py”, line 4, in
from cupyx.scipy.sparse._base import spmatrix as _spmatrix
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/scipy/sparse/init.py”, line 1, in
from cupyx.scipy.sparse._base import issparse # NOQA
File “/home/nvidia/.local/lib/python3.8/site-packages/cupyx/scipy/sparse/_base.py”, line 10, in
import scipy.sparse as _sparse
File “/usr/lib/python3/dist-packages/scipy/sparse/init.py”, line 229, in
from .base import *
File “/usr/lib/python3/dist-packages/scipy/sparse/base.py”, line 8, in
from .sputils import (isdense, isscalarlike, isintlike,
File “/usr/lib/python3/dist-packages/scipy/sparse/sputils.py”, line 16, in
supported_dtypes = [np.typeDict for x in supported_dtypes]
File “/usr/lib/python3/dist-packages/scipy/sparse/sputils.py”, line 16, in
supported_dtypes = [np.typeDict for x in supported_dtypes]
File “/home/nvidia/.local/lib/python3.8/site-packages/numpy/init.py”, line 320, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module ‘numpy’ has no attribute ‘typeDict’

How to overcome this error?

Here’s my environment:
Platform: Nvidia Jetson AGX Xavier
Ubuntu: 20.04
Kernel: 5.10.104-tegra
Jetson: L4T 35.1.0
JetPack: 5.0.2
CUDA Toolkit: 11.4.239
cuDNN: 8.4.1.50
TensorRT: 5.0.2
VPI: 2.1.6
Vulkan: 1.3.203
OpenCV: 4.5.4 with CUDA: NO
Python: 3.8.10
Numpy: 1.24.3
Cupy-cuda11x: 12.1.0
scipy: 1.3.3

According to instruction on Cupy website ( Installation — CuPy 13.0.0a1 documentation, I installed Cupy via command “pip3 install cupy-cuda11x”. On that website, the SciPy tested versions are 1.7-1.10. I could go up to 1.3.3 for Scipy because of the python version. Is my problem cause by scipy? How to solve my problem? Any suggestion would be greatly appreciately. Thanks in advance.