Skip to content

Python wheel build/installation failures #11

@becurrie

Description

@becurrie

Attempting to install the python version into my project and getting some errors while attempting to build the wheel...

Collecting subtr-actor-py
  Downloading subtr_actor_py-0.1.8.tar.gz (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 41.1 MB/s eta 0:00:00                                                                                     
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: subtr-actor-py
  Building wheel for subtr-actor-py (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for subtr-actor-py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [211 lines of output]
      Running `maturin pep517 build-wheel -i C:\Users\brett\PycharmProjects\rlytics\.venv\Scripts\python.exe --compatibility off`
      🔗 Found pyo3 bindings
      ðŸ\x90\x8d Found CPython 3.13 at C:\Users\brett\PycharmProjects\rlytics\.venv\Scripts\python.exe
      📡 Using build options features from pyproject.toml
         Compiling proc-macro2 v1.0.101
         Compiling unicode-ident v1.0.9
         Compiling autocfg v1.1.0
         Compiling target-lexicon v0.12.16
         Compiling once_cell v1.18.0
         Compiling rand_core v0.6.4
         Compiling syn v1.0.109
         Compiling siphasher v0.3.10
         Compiling cfg-if v1.0.0
         Compiling serde v1.0.219
         Compiling rawpointer v0.2.1
         Compiling libc v0.2.146
         Compiling heck v0.5.0
         Compiling serde_json v1.0.143
         Compiling thiserror v2.0.16
         Compiling encoding_rs v0.8.32
         Compiling anyhow v1.0.99
         Compiling rand v0.8.5
         Compiling phf_shared v0.11.1
         Compiling fnv v1.0.7
         Compiling paste v1.0.15
         Compiling ryu v1.0.13
         Compiling bitter v0.8.0
         Compiling itoa v1.0.6
         Compiling num-traits v0.2.15
         Compiling matrixmultiply v0.3.7
         Compiling num-integer v0.1.45
         Compiling memoffset v0.9.1
         Compiling phf_generator v0.11.1
         Compiling memchr v2.7.5
         Compiling indoc v2.0.6
         Compiling unindent v0.2.4
         Compiling glam v0.30.5
         Compiling float-ord v0.3.2
         Compiling log v0.4.28
         Compiling lazy_static v1.5.0
         Compiling rustc-hash v1.1.0
         Compiling bitter v0.6.1
         Compiling quote v1.0.40
         Compiling pyo3-build-config v0.22.6
         Compiling syn v2.0.106
         Compiling num-complex v0.4.3
         Compiling ndarray v0.15.6
         Compiling ndarray v0.16.1
         Compiling pyo3-macros-backend v0.22.6
         Compiling pyo3-ffi v0.22.6
         Compiling pyo3 v0.22.6
         Compiling phf_macros v0.11.1
         Compiling phf v0.11.1
         Compiling serde_derive v1.0.219
         Compiling thiserror-impl v2.0.16
         Compiling derive-new v0.7.0
         Compiling pyo3-macros v0.22.6
         Compiling boxcars v0.10.6
         Compiling boxcars v0.9.9
         Compiling numpy v0.22.1
         Compiling subtr-actor v0.1.8 (C:\Users\brett\AppData\Local\Temp\pip-install-2j_atetd\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0\local_dependencies\subtr-actor)
         Compiling subtr-actor-py v0.1.8 (C:\Users\brett\AppData\Local\Temp\pip-install-2j_atetd\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0)
      error: could not compile `subtr-actor-py` (lib) due to 4 previous errors
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--release" "--features" "pyo3/extension-module" "--manifest-path" "C:\\Users\\brett\\AppData\\Local\\Temp\\pip-install-2j_atetd\\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0\\Cargo.toml" "--message-format" "json" "--lib"`
      warning: hiding a lifetime that's elided elsewhere is confusing
         --> local_dependencies\subtr-actor\src\util.rs:162:18
          |
      162 |     fn get_entry(&mut self, key: K) -> Entry<K, V>;
          |                  ^^^^^^^^^             ----------- the same lifetime is hidden here
          |                  |
          |                  the lifetime is elided here
          |
          = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
          = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
      help: use `'_` for type paths
          |
      162 |     fn get_entry(&mut self, key: K) -> Entry<'_, K, V>;
          |                                              +++


      warning: hiding a lifetime that's elided elsewhere is confusing
         --> local_dependencies\subtr-actor\src\util.rs:192:18
          |
      192 |     fn get_entry(&mut self, key: K) -> Entry<K, V> {
          |                  ^^^^^^^^^             ----------- the same lifetime is hidden here
          |                  |
          |                  the lifetime is elided here
          |
          = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
      help: use `'_` for type paths
          |
      192 |     fn get_entry(&mut self, key: K) -> Entry<'_, K, V> {
          |                                              +++


      error[E0308]: mismatched types
         --> src\lib.rs:127:25
          |
      127 |         .process_replay(&replay)
          |          -------------- ^^^^^^^ expected `boxcars::models::Replay`, found `Replay`
          |          |
          |          arguments to this method are incorrect
          |
      note: two different versions of crate `boxcars` are being used; two types coming from two different versions of the same crate are different types even if they look the same
         --> C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.9.9\src\models.rs:18:1
          |
      18  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the found type `Replay`
          |
         ::: C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.10.6\src\models.rs:17:1
          |
      17  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the expected type `boxcars::models::Replay`
          |
         ::: src\lib.rs:8:5
          |
      8   | use subtr_actor::*;
          |     ----------- one version of crate `boxcars` used here, as a dependency of crate `subtr_actor`
      ...
      16  | fn replay_from_data(data: &[u8]) -> PyResult<boxcars::Replay> {
          |                                              ------- one version of crate `boxcars` used here, as a direct dependency of the current crate
          = help: you can use `cargo tree` to explore your dependency tree
      note: method defined here
         --> C:\Users\brett\AppData\Local\Temp\pip-install-2j_atetd\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0\local_dependencies\subtr-actor\src\collector\mod.rs:58:8
          |
      58  |     fn process_replay(mut self, replay: &boxcars::Replay) -> SubtrActorResult<Self> {
          |        ^^^^^^^^^^^^^^


      error[E0599]: no method named `into_pyarray_bound` found for struct `ArrayBase` in the current scope
         --> src\lib.rs:139:41
          |
      139 |     let python_nd_array = rust_nd_array.into_pyarray_bound(py);
          |                                         ^^^^^^^^^^^^^^^^^^ method not found in `ArrayBase<OwnedRepr<f32>, Dim<[usize; 2]>>`


      error[E0308]: mismatched types
         --> src\lib.rs:182:43
          |
      182 |         .process_and_get_meta_and_headers(&replay)
          |          -------------------------------- ^^^^^^^ expected `boxcars::models::Replay`, found `Replay`
          |          |
          |          arguments to this method are incorrect
          |
      note: two different versions of crate `boxcars` are being used; two types coming from two different versions of the same crate are different types even if they look the same
         --> C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.9.9\src\models.rs:18:1
          |
      18  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the found type `Replay`
          |
         ::: C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.10.6\src\models.rs:17:1
          |
      17  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the expected type `boxcars::models::Replay`
          |
         ::: src\lib.rs:8:5
          |
      8   | use subtr_actor::*;
          |     ----------- one version of crate `boxcars` used here, as a dependency of crate `subtr_actor`
      ...
      16  | fn replay_from_data(data: &[u8]) -> PyResult<boxcars::Replay> {
          |                                              ------- one version of crate `boxcars` used here, as a direct dependency of the current crate
          = help: you can use `cargo tree` to explore your dependency tree
      note: method defined here
         --> C:\Users\brett\AppData\Local\Temp\pip-install-2j_atetd\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0\local_dependencies\subtr-actor\src\collector\ndarray.rs:211:12
          |
      211 |     pub fn process_and_get_meta_and_headers(
          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


      error[E0308]: mismatched types
         --> src\lib.rs:213:26
          |
      213 |         .get_replay_data(&replay)
          |          --------------- ^^^^^^^ expected `boxcars::models::Replay`, found `Replay`
          |          |
          |          arguments to this method are incorrect
          |
      note: two different versions of crate `boxcars` are being used; two types coming from two different versions of the same crate are different types even if they look the same
         --> C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.9.9\src\models.rs:18:1
          |
      18  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the found type `Replay`
          |
         ::: C:\Users\brett\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\boxcars-0.10.6\src\models.rs:17:1
          |
      17  | pub struct Replay {
          | ^^^^^^^^^^^^^^^^^ this is the expected type `boxcars::models::Replay`
          |
         ::: src\lib.rs:8:5
          |
      8   | use subtr_actor::*;
          |     ----------- one version of crate `boxcars` used here, as a dependency of crate `subtr_actor`
      ...
      16  | fn replay_from_data(data: &[u8]) -> PyResult<boxcars::Replay> {
          |                                              ------- one version of crate `boxcars` used here, as a direct dependency of the current crate
          = help: you can use `cargo tree` to explore your dependency tree
      note: method defined here
         --> C:\Users\brett\AppData\Local\Temp\pip-install-2j_atetd\subtr-actor-py_4a74e236c3d748a49de2e32fe836d0a0\local_dependencies\subtr-actor\src\collector\replay_data.rs:713:12
          |
      713 |     pub fn get_replay_data(mut self, replay: &boxcars::Replay) -> SubtrActorResult<ReplayData> {
          |            ^^^^^^^^^^^^^^^


      Some errors have detailed explanations: E0308, E0599.

      For more information about an error, try `rustc --explain E0308`.

      Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'C:\\Users\\brett\\PycharmProjects\\rlytics\\.venv\\Scripts\\python.exe', '--compatibility', 'off'] returned non-zero exit status 1

I'm using a venv within my project, Python 3.13.5 and I have Rust installed on my machine (rustup 1.28.2) (rustc 1.89.0).

Any thoughts or suggestions here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions