dpnp
dpnp copied to clipboard
Install dpnp with pip
Hi! I have trouble with installing dpnp in my virtual env.
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpnp Looking in indexes: https://pypi.anaconda.org/intel/simple ERROR: Could not find a version that satisfies the requirement dpnp (from versions: none) ERROR: No matching distribution found for dpnp
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpnp==0.14.0 Looking in indexes: https://pypi.anaconda.org/intel/simple ERROR: Could not find a version that satisfies the requirement dpnp==0.14.0 (from versions: none) ERROR: No matching distribution found for dpnp==0.14.0
Can you help me, please?
Hi @Hellail ,
I guess you might have a conflict with already installed pip packages in your virtual env which are prerequisite for dpnp installation.
Could you please check a version of numpy package it is install in the env?
python -m pip show numpy
@antonwolfy
Package Version
pip 23.2.1 setuptools 68.2.0 wheel 0.41.2
Do you have the below packages installed in your env?
dpctl
dpcpp-cpp-rt
mkl-dpcpp
numpy
and what version if any?
The dpnp package depends on all of them and I would like to check if any dependency blocks the installation of dpnp pip package.
Also what python version are you using in the env?
@antonwolfy
Python 3.11.2
Package Version
----------------------- ---------
dpcpp-cpp-rt 2024.1.0
intel-cmplr-lib-rt 2024.1.0
intel-cmplr-lic-rt 2024.1.0
intel-opencl-rt 2024.1.0
intel-openmp 2024.1.0
mkl 2024.1.0
mkl-dpcpp 2024.1.0
numpy 1.26.4
onemkl-sycl-blas 2024.1.0
onemkl-sycl-datafitting 2024.1.0
onemkl-sycl-dft 2024.1.0
onemkl-sycl-lapack 2024.1.0
onemkl-sycl-rng 2024.1.0
onemkl-sycl-sparse 2024.1.0
onemkl-sycl-stats 2024.1.0
onemkl-sycl-vm 2024.1.0
pip 23.2.1
setuptools 68.2.0
tbb 2021.12.0
wheel 0.41.2
I also have a similar problem with installing dpctl.
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpctl
Looking in indexes: https://pypi.anaconda.org/intel/simple
ERROR: Could not find a version that satisfies the requirement dpctl (from versions: none)
ERROR: No matching distribution found for dpctl
@Hellail ,
The issue is due to python version. dpnp==0.14.0 doesn't provide support of python 3.11 yet.
Only python 3.9 and 3.10 is supported in that version.
@antonwolfy Now i use Python3.10, dpnp installed, but I can't import dpnp
Traceback (most recent call last):
File "D:\python_folder\Math_example_dpnp.py", line 1, in <module>
import dpnp
File "D:\python_folder\venv_\venv\lib\site-packages\dpnp\__init__.py", line 34, in <module>
import dpctl
File "D:\python_folder\venv_\venv\lib\site-packages\dpctl\__init__.py", line 38, in <module>
from ._device_selection import select_device_with_aspects
File "D:\python_folder\venv_\venv\lib\site-packages\dpctl\_device_selection.py", line 20, in <module>
from ._sycl_device import SyclDevice, SyclDeviceCreationError
ImportError: DLL load failed while importing _sycl_device:
@Hellail ,
It looks as a compatibility issue between dpctl and DPC++ packages.
Could you please check the version of dpcpp-cpp-rt (must be 2024.1.0) and version of dpctl (must be 0.16.0)
I've recreated the env with python 3.10 on Windows and got the following list of packages:
> pip list
Package Version
----------------------- ---------
dpcpp-cpp-rt 2024.1.0
dpctl 0.16.0
dpnp 0.14.0
intel-cmplr-lib-rt 2024.1.0
intel-cmplr-lic-rt 2024.1.0
intel-opencl-rt 2024.1.0
intel-openmp 2024.1.0
mkl 2024.1.0
mkl-dpcpp 2024.1.0
mkl-fft 1.3.8
mkl-random 1.2.4
mkl-service 2.4.1
mkl-umath 0.1.1
numpy 1.26.4
onemkl-sycl-blas 2024.1.0
onemkl-sycl-datafitting 2024.1.0
onemkl-sycl-dft 2024.1.0
onemkl-sycl-lapack 2024.1.0
onemkl-sycl-rng 2024.1.0
onemkl-sycl-sparse 2024.1.0
onemkl-sycl-stats 2024.1.0
onemkl-sycl-vm 2024.1.0
pip 24.0
setuptools 69.1.0
tbb 2021.12.0
tbb4py 2021.12.0
wheel 0.42.0
Please let me know if you have something different. At least the import looks working fine for me:
> python -c "import dpnp; print(dpnp.__version__)"
0.14.0+189.gfcddad2474
@antonwolfy some libraries were not installed, but after installation the error remained
my env
cmake 3.29.0.1
Cython 3.0.10
distro 1.9.0
dpcpp-cpp-rt 2024.1.0
dpctl 0.16.0
dpnp 0.14.0
intel-cmplr-lib-rt 2024.1.0
intel-cmplr-lic-rt 2024.1.0
intel-opencl-rt 2024.1.0
intel-openmp 2024.1.0
mkl 2024.1.0
mkl-devel 2024.1.0
mkl-devel-dpcpp 2024.1.0
mkl-dpcpp 2024.1.0
mkl-fft 1.3.8
mkl-include 2024.1.0
mkl-random 1.2.4
mkl-service 2.4.1
mkl-umath 0.1.1
msvc-runtime 14.34.31931
ninja 1.11.1.1
numpy 1.26.4
onedpl-devel 2022.5.0
onemkl-sycl-blas 2024.1.0
onemkl-sycl-datafitting 2024.1.0
onemkl-sycl-dft 2024.1.0
onemkl-sycl-lapack 2024.1.0
onemkl-sycl-rng 2024.1.0
onemkl-sycl-stats 2024.1.0
onemkl-sycl-vm 2024.1.0
opencv-python 4.9.0.80
packaging 24.0
pip 23.2.1
psutil 5.9.8
scikit-build 0.17.6
setuptools 68.2.0
tbb 2021.12.0
tbb-devel 2021.12.0
tbb4py 2021.12.0
tomli 2.0.1
wheel 0.41.2
@Hellail,
May I ask you to provide the steps you used to create the env? I'd like to replicate the issue in my local env.
Have you tried to install dpnp in a new clean env, like with command only:
> python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpnp==0.14.0 --no-cache-dir
and to check if the import works there?
Could you please double check and provide the full output for the import error if any?
Since currently it's not clear what DLL can't be loaded. The output looks truncated, one more line after
ImportError: DLL load failed while importing _sycl_device:
looks missing.
@Hellail, please let me know if the issue is still actual, or please feel free to close it.