redwoodresearch / rust_circuit_public

MIT License
60 stars 2 forks source link

ImportError: rust_circuit is not compiled, run `maturin dev` to compile and install #1

Open HerikkWang opened 1 year ago

HerikkWang commented 1 year ago

When building from source on Linux, I encountered the error "ImportError: rust_circuit is not compiled, run maturin dev to compile and install". Complete error information is shown below:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/workspace/rust_circuit_public-master/python/rust_circuit/__init__.py", line 3, in <module>
    from ._rust import *
  File "/app/workspace/rust_circuit_public-master/python/rust_circuit/_rust.py", line 25, in <module>
    raise ImportError("rust_circuit is not compiled, run `maturin dev` to compile and install")
ImportError: rust_circuit is not compiled, run `maturin dev` to compile and install

In addition, in the step "Build rust_circuit (this will take a few minutes)", there is a warning message:

Warning: Couldn't find the symbol `PyInit_rust_circuit` in the native library. Python will fail to import this module. If you're using pyo3, check that `#[pymodule]` uses `rust_circuit` as module name

Did anyone encounter the same situation above? Or can anyone give some advice to solve this problem?

acertain commented 1 year ago

Try pip install "maturin[patchelf]==0.13.7", then re-run maturin develop --features extension-module

HerikkWang commented 1 year ago

Try pip install "maturin[patchelf]==0.13.7", then re-run maturin develop --features extension-module

Thank you, it works!