Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
Bug report
On Windows, with Python 3.11, an embedded Python interpreter prints a new warning at startupCould not find platform dependent libraries <exec_prefix>
.
3.10 and older versions do not exhibit this.
Sample program (I'm using Rust / PyO3 because it's what I know, however I'm fairly sure that it's not relevant to the repro. If you've got a recommended way to configure a windows C toolchain for building an embedded Python I'd be happy to demonstrate the same issue in C):
fnmain(){unsafe{ pyo3::ffi::Py_Initialize();dbg!(pyo3::ffi::Py_IsInitialized());}}
Running outputs:
Could not find platform dependent libraries <exec_prefix>[src\main.rs:4] pyo3::ffi::Py_IsInitialized() = 1
Execution then proceeds without issue. (We observe thisin PyO3's test suite, which passes all 3.11 tests despite emitting this warning.)
I have a couple of thoughts:
- Documentation for
exec_prefix
suggests it is irrelevant on Windows. So is this warning actually useful? - I suspect this is because of the reimplementation of
getpath
into Python? (Rewrite getpath.c in Python #89745)
Your environment
- CPython versions tested on: 3.11.0
- Operating system and architecture: Windows x64