indygreg / indygreg/PyOxidizer
pyoxidizer run fails when script imports WxPython
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
I am using the latest Rust (1.35.0) and PyOx (0.2.0) on Windows 10.
When I try a simple demo app (importing uuid, as shown in the documentation), it works.
Then to build my WxPython app, I added this in my pyoxidizer.toml:
```
[[packaging_rule]]
type = "pip-install-simple"
package = "wxpython==4.0.6"
```
When I try to build with PyOxidizer, I get these errors:
```
processing packaging rule: WriteLicenseFiles(PackagingWriteLicenseFiles { path: "" })
processing packaging rule: PipInstallSimple(PackagingPipInstallSimple { package: "wxpython==4.0.6", optimize_level: 0, excludes: [], include_source: true, install_location: Embedded, extra_args: None })
C:\Users\amir\Apps\pyapp\build\target\x86_64-pc-windows-msvc\debug\pyoxidizer\python.fd43554b5654\python\install\python.exe: No module named ensurepip
installing modified distutils to C:\Users\amir\AppData\Local\Temp\pyoxidizer-pip-install.yL724fyapaid\packages
modifying distutils/_msvccompiler.py for oxidation
modifying distutils/command/build_ext.py for oxidation
modifying distutils/unixccompiler.py for oxidation
pip installing to C:\Users\amir\AppData\Local\Temp\pyoxidizer-pip-install.yL724fyapaid\install
Collecting wxpython==4.0.6
Downloading https://files.pythonhosted.org/packages/9a/a1/9c081e04798eb134b63def3db121a6e4436e1d84e76692503deef8e75423/wxPython-4.0.6.tar.gz (68.8MB)
ERROR: Complete output from command python setup.py egg_info:
ERROR: Fatal Python error: pywintypes: can not setup interpreter state, as current state is invalid
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 3221226505 in C:\Users\amir\AppData\Local\Temp\pip-install-a97kriqv\wxpython\
thread 'main' panicked at 'error running pip', C:\Users\amir\.cargo\registry\src\github.com-1ecc6299db9ec823\pyoxidizer-0.2.0\src\pyrepackager\packaging_rule.rs:830:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the Windows 10 build with the pyoxidizer.toml pip-install-simple rule for wxpython==4.0.6. Start at pyrepackager/packaging_rule.rs:830:9 and inspect how the pip-install-simple packaging step handles the ensurepip and pywintypes failures. Done means the wxPython demo builds without the reported panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100