Replies: 1 comment
-
We are not going to include in the documentation anything specific to Python or even crates like PyO3, that variable is documented in https://pyo3.rs/v0.24.2/building-and-distribution.html#cross-compiling. Python 3.6 is EOL since 2021 and we wouldn't do anything for it anyway. We do have a warning about environment variables here (for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
rust-analyzer version: rust-analyzer version: 0.3.2433-standalone
rustc version: 1.86.0 (05f9846f8 2025-03-31)
editor or extension: VSCode
relevant settings: rust-analyzer.server.extraEnv, PYO3_CROSS_LIB_DIR
I am working on a project which uses PyO3, which requires Python>=3.7
The problem I had was that on my linux machine, the
python3
command points to Python 3.6 which is not supported by PyO3. I also found that the shell VSCode uses forrust-analyser
did not use my.bashrc
profile. The workaround was to add the following to VSCode'ssettings.json
:To find what
PYO3_CROSS_LIB_DIR
should be you can do:python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"
I know that this is an issues which is quite a specific to my set-up, but it did take several hours to fix. So perhaps this can help someone else out.
Thanks,
Peter
Beta Was this translation helpful? Give feedback.
All reactions