Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build wxpython to windows 32 bit #2246

Closed
baaziznasser opened this issue Aug 21, 2022 · 30 comments
Closed

build wxpython to windows 32 bit #2246

baaziznasser opened this issue Aug 21, 2022 · 30 comments

Comments

@baaziznasser
Copy link

baaziznasser commented Aug 21, 2022

please and please and please build the wxpython to windows 32 bit
because we are facing a big problem when trying to compile it
make it as it is in 64 bit python
not all of us can install the ms vs to build it.
because there are a beginners that trying to learn this GUI and they just started programming.
make it simple please

@MahmoudAtef999
Copy link

am agree with you the wxpython refused to be built on my python 32 bit.

@baaziznasser
Copy link
Author

@swt2c @swt2c
could you do that? i think that this will be a hend of help to a lot of beginners on python
could you do that?

@swt2c
Copy link
Collaborator

swt2c commented Aug 22, 2022

I can't publish wheels, only @RobinD42 can.

@baaziznasser
Copy link
Author

@RobinD42 would you do that please?

@jiangwen365
Copy link

I can't publish wheels, only @RobinD42 can.

Hi @swt2c is it possbile you share us with the wheel file? Some of us really really need the win32 version...

@baaziznasser
Copy link
Author

hello is there any new

@oleksis
Copy link
Contributor

oleksis commented Sep 21, 2022

Using Azure Pipeline can build the artifacts. Download the wheel for Python 3.10 Windows x86 wxPython-4.2.1a1-cp310-cp310-win32.whl

@jiangwen365
Copy link

Wow, that's godsend for me! Many thanks @oleksis !

@oleksis
Copy link
Contributor

oleksis commented Sep 21, 2022

Tested with Pyenv

pyenv install 3.10.7-win32
pyenv local 3.10.7-win32
pyenv versions
python -m pip install .\wxPython-4.2.1a1-cp310-cp310-win32.whl
python -c "import wx; print(wx.version());"
4.2.1a1 msw (phoenix) wxWidgets 3.2.0

@jiangwen365
Copy link

Many thanks!

@RobinD42
Copy link
Member

This issue has been mentioned on Discuss wxPython. There might be relevant details there:

https://discuss.wxpython.org/t/32-bits-recent-wheel/36023/3

@josephsl
Copy link

Hi,

An alternative set of wheels exist as mentioned in #2235 - the mentioned wheels are based on official wxPython 4.2.0 release and targets Python 3.7, 3.8, 3.9, 3.10, and 3.11 (I'm part of a project that requires 32-bit Python for maximum compatibility across platforms).

To build 32-bit wheels for Windows, one must:

  1. Update pip (if not done so).
  2. Install the following via pip BEFORE checking out wxPython tarball: wheel, attrdict, requests.
  3. If building for Python 3.10 and later, edit attrdict, changing "from collections import Mapping" to "from collections.abc import Mapping".
  4. Download wxPython tarball via pip (pip download --no-cache-dir wxpython).
  5. Build wxpython wheel (pip wheel {wxpython-version.tar.gz} e.g. pip wheel wxpython-4.2.0.tar.gz).

It will take at least fifteen minutes to generate a wheel.

Thanks.

@josephsl
Copy link

CC @seanbudd, @codeofdusk and interested NVDA folks

@swt2c
Copy link
Collaborator

swt2c commented Oct 11, 2022

@josephsl the correct package to install is attrdict3 and you don't have to patch it for Python 3.10 support.

See requirements/devel.txt.

@josephsl
Copy link

josephsl commented Oct 11, 2022 via email

@josephsl
Copy link

Related: #2297 as it also affects 32-bit builds.

@Jalkhov
Copy link

Jalkhov commented Dec 21, 2022

Tested with Pyenv

pyenv install 3.10.7-win32
pyenv local 3.10.7-win32
pyenv versions
python -m pip install .\wxPython-4.2.1a1-cp310-cp310-win32.whl
python -c "import wx; print(wx.version());"
4.2.1a1 msw (phoenix) wxWidgets 3.2.0

I am getting pipenv.vendor.requirementslib.exceptions.RequirementError: Supplied requirement is not installable from a Pipenv enviroment with Python 3.9.10 using wxPython-py3.9-win_x86 wheel.

@Jalkhov
Copy link

Jalkhov commented Dec 21, 2022

Tested with Pyenv

pyenv install 3.10.7-win32
pyenv local 3.10.7-win32
pyenv versions
python -m pip install .\wxPython-4.2.1a1-cp310-cp310-win32.whl
python -c "import wx; print(wx.version());"
4.2.1a1 msw (phoenix) wxWidgets 3.2.0

Can be installed from Virtualenv or its Pyenv necesary?

@oleksis
Copy link
Contributor

oleksis commented Dec 21, 2022

@Jalkhov the test was with pyenv . You can try with other virtual environments like the standard venv module

python -m venv venv
.\venv\Scripts\Activate.ps1
python -m pip install .\wxPython-4.2.1a1-cp310-cp310-win32.whl
python -c "import wx; print(wx.version());"
4.2.1a1 msw (phoenix) wxWidgets 3.2.0

@EricSun1982
Copy link

please publish 32-bit Built Distributions ,thanks a lot.
image

@Metallicow
Copy link
Contributor

Do you need to build it for Windows XP SP3? final question...

@EricSun1982
Copy link

thanks for your replay.We use windows 7 32-Bit ,please built it for windows 7 32-Bit @Metallicow

@Metallicow
Copy link
Contributor

@EricSun1982 Not to be rude, but I was simply asking a question as to what you may need... not what I have time to do.
In my experience anything that runs on XP would undoubtably run on later versions of windows. This I am not absolutely sure for anything upto win7, but if a win7 *.whl file will run on ex: win10 or win11, then I see the compiled code should be 'the' same, it should work theoretically with no hickups.
As long as you don't have a highly customized setup for the OS, most things will remain the same. I cannot do your testing for you; you have to do that yourself. x64 winXP never did work quite right...(The OS I mean, and 32bit would need reformatted HDD about every year...)
Your best bet to get wheels built on XP is to ask one of the others, as my time nowadays is quite scarce. Maybe @josephsl might be able to help. Or maybe @RobinD42 might have advice if he still has a machine that works that can build one.
I haven't installed a "vanilla" version of XP in a few years from scratch, so try the alternatives.

At worst scenario, get a winXP pro image, patch it up to SP3, install on an actual hard drive or optionally(virtual machine)
Now that the OS is installed you will have 30 days to build your wheel.
This means it is time for you to install dependencies, get your build options right, and to build/and or debug problems. XP will lock you out after 30 days if you do not have a license key for the windows image. Hope this helps.

I'm not sure if you are a OS nostalgist or you really just need it, but if 'wxpython phoenix' could be built on 2000, then I'd give you a thumbs up. Python versions could present backwards capability issues also. LOL. Good luck.

@josephsl
Copy link

Hi,

32-bit wheels and wxPython will run happily under Windows 7 provided that this is Python 3.8 and earlier (NVDA screen reader is a good example of this), and by the way, as of last week, only organizations with access to Azure virtual machines can run Windows 7 until January 2024 as per Microsoft's statements in recent years (extended security updates has ended). For folks wanting Windows 8.x support for Python, I expect Python 3.11 will be the last release to support it.

A few weeks ago, I did package a 32-bit wheel of wxPython 4.2.0 for Python 3.7 to 3.11 (you will need Visual Studio to build wxPython from scratch and the wheel package to turn the resulting package into a wheel). I did this for NVDA project, also knowing that it will be handy for others down the road until we get an official wheel for wxPython 4.2.1 or later. NVDA project folks are focusing on wxPython 4.2.0/4.2.1 because it paves the way for the project to move to newer Python releases (likely 3.11.x) provided that a Component Object Model (COM) interaction bug gets fixed (what held us back was a stack corruption on x64 Windows releases, which was fixed in Python 3.11.1); another reason for moving to wxPython 4.2.x is to see InitLocale fix come to life as NVDA is a multilingual software.

Thanks.

@Metallicow
Copy link
Contributor

@josephsl Ah I see..., you are into the screen reading parts... WinXP 32bit builds probably has little interest to you as it a bit outdated for someone wanting software like that in that era(stuff that existed didn't work the best in the same time period with said components). If you are already providing Win7 32bit phoenix builds, then disregard. I was just curious if poster actually needed a WinXP Pro SP3 wxPython Phoenix build for 32 bit.

I am not blind, but sometimes to the nature of seeing acronyms all over the place in todays internet age..., as a graphics type of person, "NVDA" would be common to be mistaken for NVidia considering some of the terms used in graphics are the same.
After reading your post, it makes your intentions much clearer.

Thanks.

@josephsl
Copy link

Hi,

NVDA (NonVisual Desktop Access) did support Windows XP until end of 2017 - back then, we were running Python 2 with wxPython Classic (these days NVDA requires Windows 7 SP1 or later; it's a 32-bit software to maximize compatiblity across a wide range of systems, including running it in Windows 10 and 11 on ARM). Note that the 32-bit wheels I produced a few weeks ago are temporary until Robin or someone responsible for wxPython project uploads the 32-bit wheels to PyPI (I hope this wil be the case in 4.2.1).

Thanks.

@Metallicow
Copy link
Contributor

@josephsl I will say, that through the years, the amount of blind people that have asked me questions has increased.
This is a good thing in that for such contributions that I deem small, many of the intended users understood my words better.
Such examples of my pet peevs included back when I started to learn wxPython. ...And yes I got blind questions haha.
Many of the examples in the official wxPython demo contained functions that looked like this:

def ForExample(self, e):
    pass  # What is e? a curve, a number, something else...

def ForExample1(self, evt):
    pass  # what is evt? abc soup?, an acronym, or just tve...?

My first intention was to find out what said obfuscation was(Ex: e, or evt, or, errrrrrrrrt) and fix it to be readable. See the Zen!

def ForExampleTheRightWay(self, event, readabilityCounts=True):
    pass  # You have passed readability class!

guessability is not a strong funtion with noobs. Spell things as they should be spelled.
for example: DeltaTime = dt
otherwise you get millions of users guessing what dt is... and that COULD be a bad thing.

I hope you take some of the smaller points into consideration for your projects, besides hounding Robin. It does really make results and lessens time testing, and ultimately looks less "ugly" when submitting pull requests(PullREQz) and such.

I got your email just now and good luck in the future. If you need specialized help, don't be afraid to ask.

@josephsl
Copy link

josephsl commented Jan 18, 2023 via email

@swt2c
Copy link
Collaborator

swt2c commented Jun 8, 2023

wxPython 4.2.1 is now out with Windows 32-bit wheels. Please try installing 4.2.1.

@baaziznasser
Copy link
Author

thank you for solving the problem @swt2c @RobinD42
and thanks @josephsl for compiling the builds of 4.2.0 for 32.

also thanks to all who participated in this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants