RUSTPYTHONPATH is not set when using `Settings::default()` without clap
#4988 aperta il 23 mag 2023
Metriche repository
- Star
- (22.047 stelle)
- Metriche merge PR
- (Merge medio 2g 6h) (172 PR mergiate in 30 g)
Descrizione
Summary
I've manually set the RUSTPYTHONPATH in the system environment variable, Rust sees the correct folder location prior to calling the vm::Interpreter::without_stdlib(Default::default()).enter(|vm| { ..
and yet, the following error appears:
encodings initialization failed. Only utf-8 encoding will be supported. ModuleNotFoundError: No module named 'encodings'
The above exception was the direct cause of the following exception:
RuntimeError: Could not import encodings. Is your RUSTPYTHONPATH set? If you don't have access to a consistent external environment (e.g. if you're embedding rustpython in another application), try enabling the freeze-stdlib feature
Expected
No message
Actual
encodings initialization failed. Only utf-8 encoding will be supported. ModuleNotFoundError: No module named 'encodings'
The above exception was the direct cause of the following exception:
RuntimeError: Could not import encodings. Is your RUSTPYTHONPATH set? If you don't have access to a consistent external environment (e.g. if you're embedding rustpython in another application), try enabling the freeze-stdlib feature