Embedding Python on Windows and spawning processes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
Hi
After much frustration, I figured out why processes were failing to start when spawned through embedded python code on windows.
It seems that a small workaround is needed on windows in order to spawn new processes:
https://stackoverflow.com/questions/15636266/embedded-python-multiprocessing-not-working
This is very briefly mentioned in the Python documentation:
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.set_executable
I am not sure if the "workaround" has any side-effects or if it could be incorporated into the instantiation of Python specifically for windows?
An alternative would be putting a warning in the documentation stating that this must explicitly be configured in order to spawn processes on windows.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Python multiprocessing.set_executable documentation and the Stack Overflow report, then trace PyO3's Windows-specific embedded-Python initialization and process-spawn entry points. Done means determining whether the workaround is safe to incorporate or documenting the required configuration and its Windows scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100