Open RABijl opened 1 month ago
using a virtualenv with numpy version: 2.1.1 also doesn't work properly: ...
E ModuleNotFoundError: No module named 'pyopencl'
Did you install pyopencl
into your virtualenv environment?
I did not do that explicitly, I'm under the impression that is part of make prepare_examples
, I'm not seeing it without a virtualenv
It seems that make prepare_examples
installs pyopencl
. Did you create and source the virtualenv after the make prepare_examples
command? If I recall correctly, sourcing newly created virtualenv does not have (any?) python packages installed by default.
I used a virtualenv that I'd used before for some onnx related things and already had numpy installed. I also did the following things:
make prepare_examples
make
make check_tier1
I've have tried to debug this a few months ago, and AFAICT this is a bug in PyOpenCL. Due to some mistake in pip specifications, the installation pulls in both old and new (1.x and 2.x) numpy packages. I also tried following the official instructions to install from source, same result. If you manage to make a clean install of PyOpenCL with its testsuite we can try to fix the PyOpenCL install scripts in PoCL, otherwise i think this just needs to be reported as bug to PyOpenCL...
@inducer any insights on this?
I guess the first stop would be to see whether there's any sign of pyopencl in the virtualenv (/home/rabijl/Projects/pocl-3/build_test/examples/PyOpenCL/src/PyOpenCL-build/
in this case?), specifically in lib/python3.11/site-packages
or so. If not, then something is up with the build process. If yes, then something is up with the importing of it.
Thank you for getting back to us. I took a look and there was a second instance of the virtualenv that was being created during make prepare_examples
. This virtualenv has the pyopencl package in it, so there seems to be an issue importing it. I'm adding a log of the errors during the tests that might prove helpful. The PyOpenCL commit being built is: a1fe5f7
.
check_tier1 log
build (prepare_examples) log
python version: 3.11.6 apt python3-numpy version: 1:1.24.2-1 python3-numpy includes numpy headers needed to prepare examples, running prepare examples in a virtualenv does help with this.
If prepare examples was not run in a virtualenv, the following errors show up:
using a virtualenv with numpy version: 2.1.1 also doesn't work properly:
There are also a number of deprecation warnings that might hint at the source of the problem.