You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run the command "maturin develop" in the virtual env I get the following error:
(py_rust)@192-168-1-10 py_rust % maturin develop
🔗 Found pyo3 bindings
🐍 Found CPython 3.9 at /Users//.local/share/virtualenvs/py_rust-QUdKXKyu/bin/python
💥 maturin failed
Caused by: Failed to build a native library through cargo
Im using an m1 mac
Your Python version (python -V)
Python 3.9.13
Your pip version (pip -V)
pip 22.1.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
What bindings you're using
pyo3
Does cargo build work?
Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Yes
Steps to Reproduce
create the file lib.rs:
use pyo3::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug)]
struct Data {
name: String,
value: i32
}
fn sum(input: &str) -> i32 {
let parsed: Data = serde_json::from_str(input).unwrap();
parsed.name.len() as i32 + parsed.value
}
#[pymodule]
fn py_rust(_py: Python, m: &PyModule) -> PyResult<()> {
Ok(())
}
toml:
[package]
name = "py_rust"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
pyo3 = { version = "0.16.5", features = ["extension-module"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
create the virtual env and run maturin develop
The text was updated successfully, but these errors were encountered:
Bug Description
when i run the command "maturin develop" in the virtual env I get the following error:
Im using an m1 mac
Your Python version (
python -V
)Python 3.9.13
Your pip version (
pip -V
)pip 22.1.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
What bindings you're using
pyo3
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
create the file lib.rs:
toml:
create the virtual env and run maturin develop
The text was updated successfully, but these errors were encountered: