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

[Python] Numba installed via conda-forge conflict with Pipy wheels #2420

Open
3 of 4 tasks
ludmilaasb opened this issue Nov 26, 2024 · 0 comments
Open
3 of 4 tasks

[Python] Numba installed via conda-forge conflict with Pipy wheels #2420

ludmilaasb opened this issue Nov 26, 2024 · 0 comments
Labels
build The issue related to the CUDA Quantum build python-lang Anything related to the Python CUDA Quantum language implementation

Comments

@ludmilaasb
Copy link

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

Cudaq conflicts with Numba installed via the conda-forge channel. Importing Cudaq with Numba in the same Python script or importing modules that use Numba returns an LLVM error.

Note that when Numba is installed via Pip, there are no problems.

Steps to reproduce the bug

Create an environment via conda, mamba or micromamba:

conda create -y -n cudaq-env python=3.11 pip
conda install -y -n cudaq-env -c conda-forge numba
conda activate cudaq-env                
pip install cudaq

The bug can be observed when importing the libraries together (the order does not matter).

>>> import numba
>>> import cudaq
python: /llvm-project/llvm/include/llvm/Support/CommandLine.h:864: void llvm::cl::parser<DataType>::addLiteralOption(llvm::StringRef, const DT&, llvm::StringRef) [with DT = llvm::FunctionPass* (*)(); DataType = llvm::FunctionPass* (*)()]: Assertion `findOption(Name) == Values.size() && "Option already exists!"' failed.
Aborted (core dumped)

Expected behavior

The imports should happen without issues, as observed when Numba is installed via Pip.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA-Q version: 0.9.0
  • Python version: 3.11
  • Operating system: Ubuntu 24.04.1 LTS

The environment packages are:

Package                  Version   Location                                                             Installer
------------------------ --------- -------------------------------------------------------------------- ---------
astpretty                3.0.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
certifi                  2024.8.30 /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
charset-normalizer       3.4.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cuda-quantum-cu12        0.9.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cudaq                    0.9.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cudensitymat-cu12        0.0.5     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cupy-cuda12x             13.3.0    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cuquantum-python-cu12    24.11.0   /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
custatevec-cu12          1.7.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cutensor-cu12            2.0.2     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
cutensornet-cu12         2.6.0     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
fastrlock                0.8.2     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
idna                     3.10      /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
llvmlite                 0.43.0    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages
numba                    0.60.0    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages conda
numpy                    2.0.2     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages conda
nvidia-cublas-cu12       12.6.4.1  /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
nvidia-cuda-runtime-cu12 12.6.77   /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
nvidia-cusolver-cu12     11.7.1.2  /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
nvidia-cusparse-cu12     12.5.4.2  /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
nvidia-nvjitlink-cu12    12.6.85   /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
pip                      24.3.1    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages conda
requests                 2.32.3    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
scipy                    1.14.1    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
setuptools               75.6.0    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages
urllib3                  2.2.3     /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages pip
wheel                    0.45.1    /workspace/condenv/envs/cudaq-env/lib/python3.11/site-packages

Suggestions

No response

@schweitzpgi schweitzpgi added build The issue related to the CUDA Quantum build python-lang Anything related to the Python CUDA Quantum language implementation labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The issue related to the CUDA Quantum build python-lang Anything related to the Python CUDA Quantum language implementation
Projects
None yet
Development

No branches or pull requests

2 participants