Pages

Showing posts with label quil. Show all posts
Showing posts with label quil. Show all posts

Thursday, December 12, 2024

Fedora 41 : The cirq python package cannot be install - build errors

Today, I tried to use cirq python package on Fedora 41. This need the python version 3.12.
root@localhost:/home/mythcat# dnf install python3.12.x86_6c
I got some errors because ask me to install the rust:
root@localhost:/home/mythcat# curl https://sh.rustup.rs -sSf | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
...
Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.

This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env"            # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish"  # For fish
These are the next steps I used:
root@localhost:/home/mythcat# pip install --upgrade pip
...
root@localhost:/home/mythcat# pip install maturin
...
root@localhost:/home/mythcat# pip install cirq
...
Collecting cirq
  Using cached cirq-1.4.1-py3-none-any.whl.metadata (7.4 kB)
...
        cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
      
        --- stderr
        error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.20.3
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-v0zuc831/quil_ebc006157dbd433dbc0890811ee80748/quil-py/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--compatibility', 'off'] 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 quil
Failed to build quil
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (quil)
Not working ...