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

Unable to locally install qsimcirq #674

Open
svelury2 opened this issue Sep 30, 2024 · 0 comments
Open

Unable to locally install qsimcirq #674

svelury2 opened this issue Sep 30, 2024 · 0 comments

Comments

@svelury2
Copy link

svelury2 commented Sep 30, 2024

I am trying to locally install qsimcirq to do some GPU simulations of quantum circuits. I've already installed the CUDA toolkit and have added the NVCC compiler to my path (I'm doing this in a conda environment). I've also installed cuQuantum. During the make process, all the necessary files, including the NVCC compiler and cuStatevec, were properly detected. However, when I try to install using pip install . , I get several CMake warnings & two errors that I am not sure how to resolve. I am currently running CMake 3.30.4. Any feedback on how to resolve this would be greatly appreciated.

Building wheels for collected packages: qsimcirq
  Building wheel for qsimcirq (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [275 lines of output]
      /home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/__init__.py -> build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/_version.py -> build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/qsimh_simulator.py -> build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/qsim_circuit.py -> build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/qsim_simulator.py -> build/lib.linux-x86_64-cpython-312/qsimcirq
      copying qsimcirq/py.typed -> build/lib.linux-x86_64-cpython-312/qsimcirq
      running build_ext
      -- The CXX compiler identification is GNU 13.2.0
      -- The CUDA compiler identification is NVIDIA 12.4.99
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Detecting CUDA compiler ABI info
      -- Detecting CUDA compiler ABI info - done
      -- Check for working CUDA compiler: /home/svelury/anaconda3/envs/QuantumMLEnv/bin/nvcc - skipped
      -- Detecting CUDA compile features
      -- Detecting CUDA compile features - done
      -- Found OpenMP_CXX: -fopenmp (found version "4.5")
      -- Found OpenMP: TRUE (found version "4.5")
      -- The C compiler identification is GNU 13.2.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/basic/CMakeLists.txt:17 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonInterp: /home/svelury/anaconda3/envs/QuantumMLEnv/bin/python (found suitable version "3.12.3", minimum required is "3.7")
      -- Found PythonLibs: /home/svelury/anaconda3/envs/QuantumMLEnv/lib/libpython3.12.so
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/decide/CMakeLists.txt:15 (include)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at pybind_interface/decide/CMakeLists.txt:19 (find_package):
        Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
        --help-policy CMP0146" for policy details.  Use the cmake_policy command to
        set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
      -- Found Threads: TRUE
      -- Found CUDA: /home/svelury/anaconda3/envs/QuantumMLEnv (found version "12.4")
      -- Found Python3: /home/svelury/anaconda3/envs/QuantumMLEnv/bin/python3.12 (found suitable version "3.12.3", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/cuda/CMakeLists.txt:22 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at pybind_interface/cuda/CMakeLists.txt:23 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonLibs: /home/svelury/anaconda3/envs/QuantumMLEnv/lib/libpython3.12.so (found suitable version "3.12.3", minimum required is "3.7")
      CMake Warning (dev) at pybind_interface/cuda/CMakeLists.txt:24 (find_package):
        Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
        --help-policy CMP0146" for policy details.  Use the cmake_policy command to
        set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/custatevec/CMakeLists.txt:30 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at pybind_interface/custatevec/CMakeLists.txt:31 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      CMake Warning (dev) at pybind_interface/custatevec/CMakeLists.txt:32 (find_package):
        Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
        --help-policy CMP0146" for policy details.  Use the cmake_policy command to
        set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/sse/CMakeLists.txt:17 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/avx512/CMakeLists.txt:17 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      CMake Warning (dev) at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/FindPythonLibsNew.cmake:101 (message):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning, or
        preferably upgrade to using FindPython, either by calling it explicitly
        before pybind11, or by setting PYBIND11_FINDPYTHON ON before pybind11.
      Call Stack (most recent call first):
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Common.cmake:228 (include)
        /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        pybind_interface/GetPybind11.cmake:10 (find_package)
        pybind_interface/avx2/CMakeLists.txt:15 (INCLUDE)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found pybind11: /home/svelury/anaconda3/envs/QuantumMLEnv/include (found version "2.13.6")
      -- Found pybind11 v2.13.6: /home/svelury/anaconda3/envs/QuantumMLEnv/include;/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12
      -- Configuring done (2.3s)
      CMake Error in pybind_interface/decide/CMakeLists.txt:
        CUDA_ARCHITECTURES is empty for target "qsim_decide".


      CMake Error in pybind_interface/cuda/CMakeLists.txt:
        CUDA_ARCHITECTURES is empty for target "qsim_cuda".


      CMake Warning (dev) in pybind_interface/custatevec/CMakeLists.txt:
        Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
        empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
        for policy details.  Use the cmake_policy command to set the policy and
        suppress this warning.

        CUDA_ARCHITECTURES is empty for target "qsim_custatevec".
      This warning is for project developers.  Use -Wno-dev to suppress it.

      CMake Warning at /home/svelury/anaconda3/envs/QuantumMLEnv/share/cmake-3.29/Modules/FindCUDA.cmake:2012 (add_library):
        Cannot generate a safe runtime search path for target qsim_custatevec
        because files in some directories may conflict with libraries in implicit
        directories:

          runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-linux-gnu/13 may be hidden by files in:
            /home/svelury/anaconda3/envs/QuantumMLEnv/lib

        Some of these libraries may not be found correctly.
      Call Stack (most recent call first):
        pybind_interface/custatevec/CMakeLists.txt:39 (cuda_add_library)


      -- Generating done (0.0s)
      CMake Generate step failed.  Build files cannot be regenerated correctly.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/svelury/qsim/setup.py", line 119, in <module>
          setup(
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/svelury/qsim/setup.py", line 39, in run
          self.build_extension(ext)
        File "/home/svelury/qsim/setup.py", line 100, in build_extension
          subprocess.check_call(
        File "/home/svelury/anaconda3/envs/QuantumMLEnv/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '/home/svelury/qsim', '-DCMAKE_CUDA_COMPILER=nvcc', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/svelury/qsim/build/lib.linux-x86_64-cpython-312/qsimcirq', '-DPYTHON_EXECUTABLE=/home/svelury/anaconda3/envs/QuantumMLEnv/bin/python', '-DPYTHON_INCLUDE_DIR=/home/svelury/anaconda3/envs/QuantumMLEnv/include/python3.12', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for qsimcirq
  Running setup.py clean for qsimcirq
Failed to build qsimcirq
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (qsimcirq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant