-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pip install of wxPython 4.2.0 fails with python 3.11 #2296
Comments
Did you install |
I installed attrdict3 via pip right before installing wxPython. You can see it in the output above. Is there maybe a specific way to install it or is pip install sufficient? |
Looking at the log above, it looks like you installed it as part of the same transaction... |
Correct, it is part of the requirements.txt which is installed all at once with pip. Do you think I need to install it seperately? |
Yes. |
Thanks, I tried it and it got a step further. Unfortunately i get following error while compiling the package × Running setup.py install for wxPython did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
C:\Users\sebastian.zanoni\.virtualenvs\311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Users\sebastian.zanoni\.virtualenvs\311\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
C:\Users\sebastian.zanoni\.virtualenvs\311\Lib\site-packages\setuptools\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
C:\Users\sebastian.zanoni\.virtualenvs\311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
Will build using: "C:\Users\sebastian.zanoni\.virtualenvs\311\Scripts\python.exe"
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
CL.exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe
Downloading microsoft.web.webview2 1.0.1185.39...
Connection successful...
Data downloaded...
wxWidgets build options: ['--wxpython', '--unicode']
Updating wx/msw/setup.h
setting build options...
nmake.exe -f makefile.vc UNICODE=1 OFFICIAL_BUILD=1 COMPILER_VERSION=140 SHARED=1 MONOLITHIC=0 USE_OPENGL=1 USE_GDIPLUS=1 BUILD=release
Microsoft (R) Program Maintenance Utility Version 14.33.31629.0
Copyright (C) Microsoft Corporation. All rights reserved.
if not exist vc140_x64_mswudll mkdir vc140_x64_mswudll
if not exist ..\..\lib\vc140_x64_dll mkdir ..\..\lib\vc140_x64_dll
if not exist ..\..\lib\vc140_x64_dll\mswu mkdir ..\..\lib\vc140_x64_dll\mswu
if not exist ..\..\lib\vc140_x64_dll\mswu\wx mkdir ..\..\lib\vc140_x64_dll\mswu\wx
if not exist ..\..\lib\vc140_x64_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\vc140_x64_dll\mswu\wx\setup.h
1 file(s) copied.
if not exist ..\..\lib\vc140_x64_dll\mswu\wx\msw mkdir ..\..\lib\vc140_x64_dll\mswu\wx\msw
cl /EP /nologo "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\vc140_x64_dll\mswu\wx\msw\rcdefs.h"
genrcdefs.h
cl /c /nologo /TC /Fovc140_x64_mswudll\wxregex_pcre2_auto_possess.obj /MD /DWIN32 /Zi /Fd..\..\lib\vc140_x64_dll\wxregexu.pdb /O2 /D_CRT_SECURE_NO_DEPRECATE=1 /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 /D__NO_VC_CRTDBG__ /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\include /I..\..\lib\vc140_x64_dll\mswu /I..\..\3rdparty\pcre\src\wx /D__WX__ /DHAVE_CONFIG_H /D_UNICODE ..\..\3rdparty\pcre\src\pcre2_auto_possess.c
pcre2_auto_possess.c
C:\Users\sebastian.zanoni\AppData\Local\Temp\pip-install-cegcsy52\wxpython_8e836178d56747d496ae073d0bfca6de\ext\wxWidgets\include\wx/chartype.h(105): fatal error C1083: Cannot open include file: 'tchar.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.
Error building
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "C:\Users\sebastian.zanoni\AppData\Local\Temp\pip-install-cegcsy52\wxpython_8e836178d56747d496ae073d0bfca6de\build.py", line 1563, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "C:\Users\sebastian.zanoni\AppData\Local\Temp\pip-install-cegcsy52\wxpython_8e836178d56747d496ae073d0bfca6de\buildtools\build_wxwidgets.py", line 503, in main
exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
File "C:\Users\sebastian.zanoni\AppData\Local\Temp\pip-install-cegcsy52\wxpython_8e836178d56747d496ae073d0bfca6de\buildtools\build_wxwidgets.py", line 72, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error building
Finished command: build_wx (0m1.984s)
Finished command: build (0m1.984s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"C:\Users\sebastian.zanoni\.virtualenvs\311\Scripts\python.exe" -u build.py build
Command '"C:\Users\sebastian.zanoni\.virtualenvs\311\Scripts\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxPython Somehow it doen't find |
Not sure about that. Do you have C++ support installed with Visual Studio? |
Yes, wxpython with python 3.10 works fine on the same machine. |
Indeed. If you installed the wheel for Python 3.10, then you did not compile it yourself. |
So how can we resolve this issue? Can you guide me how to compile wxPython for 3.11? |
FWIW, I have done a little more research and the main reason the build is failing (at least for my setup) is that the include paths are not resolved correctly. Lines 997 to 1006 in 3ee614e
I don't know whether the build is supposed to work with win11 and VS2022, therefore I guess I'll wait for the offical wheels, thanks for your help! Let me know if you want to do further investigation, I'll be happy to help. Thanks again. |
This same thing is happening to me in Python 3.10 in docker. To reproduce: Enter the Ubunutu-based Python 3.10 docker container docker run -it python3.10 bash Then run ⟩ docker run -it python:3.10 bash
root@bb96d10e2c88:/# pip install wxPython==4.2.0
Collecting wxPython==4.2.0
Downloading wxPython-4.2.0.tar.gz (71.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.0/71.0 MB 9.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-x50rr2yc/wxpython_8d81c8b381de4bab88b403313cd92605/setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "/tmp/pip-install-x50rr2yc/wxpython_8d81c8b381de4bab88b403313cd92605/buildtools/config.py", line 30, in <module>
from attrdict import AttrDict
ModuleNotFoundError: No module named 'attrdict'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[notice] A new release of pip available: 22.2.2 -> 22.3
[notice] To update, run: pip install --upgrade pip It seems that attrdict3 needs to be installed for wxPython to successfully installed regardless of OS, but attrdict3 is only required when the host OS is windows: https://github.com/wxWidgets/Phoenix/blob/master/requirements/devel.txt#L24 |
@swt2c, thanks for the quick response! Is that change not reflected in 4.2.0? I appears that attrdict3 wasn't made a requirement for the package in the latest version. I very well could be missing something, though. |
No, that change was made post-4.2.0. |
Okay sounds good! I assume it'll be in the next patch release? Thanks again! |
This issue has been mentioned on Discuss wxPython. There might be relevant details there: |
This issue has been mentioned on Discuss wxPython. There might be relevant details there: https://discuss.wxpython.org/t/is-wxpython-compatible-with-python-3-11-0-on-windows-10/36211/2 |
@RobinD42, are you planning to build and publish the wheels for python 3.11? |
There will have to be a new release for supporting python 3.11. |
I too am having this problem after upgrading the os.. and I installed the packages separately before running the build. Any advice here would be appreciated since I can't run any of my wx code (base) chrisb@GX701GXR: × python setup.py egg_info did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
On Fri, 11 Nov 2022, Chris Berberich wrote:
I too am having this problem after upgrading the os.. and I installed the
packages separately before running the build. Any advice here would be
appreciated since I can't run any of my wx code
(base) ***@***.***:$ pip3 install attrdict
You need attrdict3 not attrdict.
Scott
|
I'm having this too. I did:
And got: × python setup.py bdist_wheel did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
I ve the same. |
@swt2c, I have seen that you are already building the wheel for py311 (https://alldunn.visualstudio.com/wxPython-CI/_build/results?buildId=1061&view=logs&j=1673e16c-f486-5fbe-9e06-af58c9e250b7). Do you have the possibility to upload it to the snapshot builds? |
same issue [fz0x1@fedora ~]$ pip3 install -v --user wxPython
Using pip 22.3.1 from /home/fz0x1/.local/lib/python3.10/site-packages/pip (python 3.10)
Collecting wxPython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Running command python setup.py egg_info
/usr/lib/python3.10/site-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:300: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running egg_info
creating /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info
writing /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/dependency_links.txt
writing entry points to /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/entry_points.txt
writing requirements to /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/sphinx/build'
warning: no previously-included files matching '.git' found under directory 'wx'
warning: no previously-included files matching '*.pyc' found under directory 'wx'
warning: no previously-included files matching '__pycache__' found under directory 'wx'
adding license file 'LICENSE.txt'
writing manifest file '/tmp/pip-pip-egg-info-8cqo__44/wxPython.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Collecting pillow
Downloading Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 7.1 MB/s eta 0:00:00
Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from wxPython) (1.16.0)
Collecting numpy
Downloading numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 19.7 MB/s eta 0:00:00
Installing collected packages: pillow, numpy, wxPython
changing mode of /home/fz0x1/.local/bin/f2py to 755
changing mode of /home/fz0x1/.local/bin/f2py3 to 755
changing mode of /home/fz0x1/.local/bin/f2py3.10 to 755
DEPRECATION: wxPython is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running command Running setup.py install for wxPython
/usr/lib/python3.10/site-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/dist.py:300: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"/usr/bin/python3" -u build.py build
/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/build.py:43: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.dep_util import newer, newer_group
Will build using: "/usr/bin/python3"
3.10.8 (main, Nov 14 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-2)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
configure: error: C++ compiler is needed to build wxWidgets
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/build.py", line 1563, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/buildtools/build_wxwidgets.py", line 379, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/buildtools/build_wxwidgets.py", line 72, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0.633s)
Finished command: build (0.633s)
Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.
error: subprocess-exited-with-error
× Running setup.py install for wxPython did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /usr/bin/python3 -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' install --record /tmp/pip-record-u35w_w1i/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/fz0x1/.local/include/python3.10/wxPython
cwd: /tmp/pip-install-lp5fz685/wxpython_5c8be3ae91b14de992d164b46d2c1031/
Running setup.py install for wxPython ... error
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxPython
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure. |
I've got the same trouble on a SuSE Linux (Leap 15.4) with Python 3.10.11 built from source. Running command: build_py
Checking for /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/bin/waf-2.0.24...
"/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python" /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/bin/waf-2.0.24 --wx_config=/tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/build/wxbld/gtk3/wx-config --gtk3 --python="/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python" --out=build/waf/3.10/gtk3 configure build
Setting top to : /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a
Setting out to : /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/build/waf/3.10/gtk3
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/bin/g++
Checking for program 'python' : /home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python
Checking for python version >= 3.7.0 : 3.10.11
python-config : not found
Checking for library python3.10 in LIBDIR : yes
Checking for header Python.h : Distutils not installed? Broken python installation? Get python-config now!
The configuration failed
(complete log in /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/build/waf/3.10/gtk3/config.log)
Command '"/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python" /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/bin/waf-2.0.24 --wx_config=/tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/build/wxbld/gtk3/wx-config --gtk3 --python="/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python" --out=build/waf/3.10/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0m1.30s)
Finished command: build (1m21.724s)
Command '"/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python" -u build.py build' failed with exit code 1.
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/bin/python -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-l8bfwyv2
cwd: /tmp/pip-install-uk9gvb8g/wxpython_a0c02055c2ed4fd989fdb55af1dfa75a/
Building wheel for wxPython (setup.py) ... error
ERROR: Failed building wheel for wxPython
Running setup.py clean for wxPython
Running command python setup.py clean
/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/lib/python3.10/site-packages/setuptools/dist.py:755: SetuptoolsDeprecationWarning: Invalid dash-separated options
opt = self.warn_dash_deprecation(opt, section)
/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
parsed = self.parsers.get(option_name, lambda x: x)(value)
/home/jacek/bin/tmp/Python-3.10.11/dist/displaycal/lib/python3.10/site-packages/setuptools/dist.py:955: DistDeprecationWarning: use_2to3 is ignored.
ep.load()(self, ep.name, value)
running clean
'build/lib.linux-x86_64-cpython-310' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.10' does not exist -- can't clean it
Failed to build wxPython
ERROR: Could not build wheels for wxPython, which is required to install pyproject.toml-based projects |
@JacekRuzyczka, from your log: The build process couldn't find |
This worked for me. |
I'm also facing same issue.
Can anyone tell? how to install |
For what it's worth, I just wanted to say what worked for me: |
@sabdulmajid |
@swt2c |
@JacekRuzyczka make sure it is in your $PATH. |
Then let's wait for the official release... |
If you have attrdict3 installed (before trying to install wxPython, not at the same time), then I don't have any ideas for you.
Then let's wait for the official release...
Any idea when?
|
It's absolutely ridiculous that this is still an issue. Python 3.11 was released in October of last year. It's been over half a year, and people still have to do weird workarounds and hacks that A) they shouldn't have to do and B) that only work half the time. "So you have to install this, then that, then this, then open a particular command prompt and then it might work" is an absolutely awful developer experience. |
[# Gabry B:] Totally AGREE you with you.
So the question could be: is there something we could do to ask DEVs to normalize this situation?
Maybe collecting signatures and send a petition?
|
New release 4.2.1 has been made with Python 3.11 wheels. |
Hello all, I am also trying to install wxPython on Python 3.11 (Windows 10). I tried pip install wxPython==4.2.1 but still did not work. I need it to use eelbrain. However, I tried to install all dependenices but wxPython still fails to build. DId someone find out a complete solution? I read the entire thread but not finding one fitting for me. Here the output:
|
What happened when you tried to install wxPython 4.2.1? The log above is not from 4.2.1. Releases older than 4.2.1 will not work with Python 3.11. |
Apologies for the confusing report. Here is the terminal output when I try with: pip install wxpython==4.2.1 It seems an issue with building the wheel, as before showing the log it takes some minutes.
|
Are you sure that's Windows? It sure looks like Linux. In any event, you're seeing an error when building with newer Cython (that I've already fixed but not in a new release). You can try |
It did the job, thank you! 🥳 |
hi am using Python 3.7.8 and try to install pip install -U wxPython × Building wheel for wxPython (pyproject.toml) did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
I would recommend upgrading your Python version. Python 3.7 is end of life and we don't have wheels for it anymore. |
I noticed that wxPython couldn't be installed as a dependency with Python 3.12 on MacOS. It failed with the following error message: ModuleNotFoundError: No module named 'attrdict' After consulting wxWidgets/Phoenix#2296, I found out that this was an issue with wxPython and confirmed that 4.2.1 works. I tested this locally.
Operating system: Windows 11 21h2
wxPython version & source: 4.2.0, pip
Python version & source: 3.11, stock
Description of the problem: It is possible to download wxPython 4.2.0 with python 3.11, but the installation fails with the following error.
I tried with both package attrdict and attrdict3
Everything works as expected with py310, even w/o the attrdict package.
The text was updated successfully, but these errors were encountered: