fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

beginner error: could not find native static library #42

Closed okpatil4u closed 3 years ago

okpatil4u commented 3 years ago

I am new to using python through rust.

I have setup this library path

export LD_LIBRARY_PATH=/usr/local/lib/libtorch/lib:/opt/homebrew/Caskroom/miniforge/base/lib

I can build and run Pyo3 code using above export. But I am getting following error during cargo build

error: could not find native static library `python3.9`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `pyo3`

I am on OS X with miniforge anaconda python.

Thanks for your help.

de-vri-es commented 3 years ago

This sounds like a problem with your system and pyo3, not with inline-python specifically. You should have better luck if you report the issue there.

Since there is nothing we can do about it here, I'm closing this issue. Good luck though!

okpatil4u commented 3 years ago

Agreed, I tried using Windows and it worked without any issue. Thanks for quick reply.