PyO3 module error

Compiling pyo3 v0.13.2
error: failed to run custom build command for pyo3 v0.13.2

Caused by:
process didn't exit successfully: C:\Users\2020\RUSTprogram\target\debug\build\pyo3-8786ed9dcaa55a08\build-script-build (exit code: 1)
--- stderr
Error: "Python 3.x interpreter not found"
Why this?

It was unable to find a Python 3 interpreter on your %PATH%.

I'd double check that you can execute python3 --version from the command line, otherwise you may need to install Python again or fiddle with environment variables.

2 Likes

Thanks, also, if you know, double on c it's what type on rust and on python i need always to define types(if i want to use function from python on rust)?)

Number types on Rust start with i (signed integer), u (unsigned integer), or f (floating point) and then end with the number of bits. So a 64-bit floating point number (double in C) is called f64.

I think Python's float type depends on the architecture or how the interpreter was compiled:

https://stackoverflow.com/questions/8216088/how-to-check-the-size-of-a-float-in-python

On my computer float is 64 bits.

I had wrote python3 --version and output on next line: Python, so it exists)?
I need to enter py --version then 3.9.4
But there is still issue.
I understood the problem, i had wrote python usage of rust code, and typed wrong version in dependencies but there is the same Python 3. Interpreter not found

Are you running this in a pyenv to ensure control over the python version?

In windows cmd py --version: 3.9.4, or in python cmd also needed to check?
I have tried to change python interpreter in vscode, but as i chosen conda path, or for newly downloaded py path, there's an error

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.