简体   繁体   中英

Install wxpython inside docker using python2

As a way to explore an old app, I'm trying to install wxPython inside Docker and I'm always getting an error when installing this package:

#6 297.0 Installing collected packages: pillow, six, numpy, wxPython
#6 299.3   WARNING: The scripts f2py, f2py2 and f2py2.7 are installed in '/root/.local/bin' which is not on PATH.
#6 299.3   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
#6 299.3     Running setup.py install for wxPython: started
#6 304.1     Running setup.py install for wxPython: finished with status 'error'
#6 304.1     ERROR: Command errored out with exit status 1:
#6 304.1      command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-J_zZjn/wxPython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-J_zZjn/wxPython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-u0ZgEQ/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /root/.local/include/python2.7/wxPython
#6 304.1          cwd: /tmp/pip-install-J_zZjn/wxPython/
#6 304.1     Complete output (104 lines):
#6 304.1     running install
#6 304.1     running build
#6 304.1     WARNING: Building this way assumes that all generated files have been
#6 304.1     generated already.  If that is not the case then use build.py directly
#6 304.1     to generate the source and perform the build stage.  You can use
#6 304.1     --skip-build with the bdist_* or install commands to avoid this
#6 304.1     message and the wxWidgets and Phoenix build steps in the future.
#6 304.1     
#6 304.1     "/usr/local/bin/python" -u build.py build
#6 304.1     Will build using: "/usr/local/bin/python"
#6 304.1     2.7.18 (default, Apr 20 2020, 19:51:05)
#6 304.1     [GCC 9.2.0]
#6 304.1     Python's architecture is 64bit
#6 304.1     cfg.VERSION: 4.1.1
#6 304.1     
#6 304.1     Running command: build
#6 304.1     Running command: build_wx
#6 304.1     wxWidgets build options: ['--wxpython', '--unicode', '--no_config', '--gtk3']
#6 304.1     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']
#6 304.1     /usr/bin/make
#6 304.1     make --jobs=8
#6 304.1     rm -f /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/libwxregexu-3.1.a
#6 304.1     ar rc /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/libwxregexu-3.1.a wxregex_regcomp.o wxregex_regexec.o wxregex_regerror.o wxregex_regfree.o
#6 304.1     rm -f /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/libwxscintilla-3.1.a
#6 304.1     ranlib /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/libwxregexu-3.1.a
#6 304.1     ar rc /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/libwxscintilla-3.1.a wxscintilla_LexA68k.o wxscintilla_LexAbaqus.o wxscintilla_LexAda.o wxscintilla_LexAPDL.o wxscintilla_LexAsm.o wxscintilla_LexAsn1.o wxscintilla_LexASY.o wxscintilla_LexAU3.o wxscintilla_LexAVE.o wxscintilla_LexAVS.o wxscintilla_LexBaan.o wxscintilla_LexBash.o wxscintilla_LexBasic.o wxscintilla_LexBatch.o wxscintilla_LexBibTeX.o wxscintilla_LexBullant.o wxscintilla_LexCaml.o wxscintilla_LexCLW.o wxscintilla_LexCmake.o wxscintilla_LexCOBOL.o wxscintilla_LexCoffeeScript.o wxscintilla_LexConf.o wxscintilla_LexCPP.o wxscintilla_LexCrontab.o wxscintilla_LexCsound.o wxscintilla_LexCSS.o wxscintilla_LexD.o wxscintilla_LexDiff.o wxscintilla_LexDMAP.o wxscintilla_LexDMIS.o wxscintilla_LexECL.o wxscintilla_LexEDIFACT.o wxscintilla_LexEiffel.o wxscintilla_LexErlang.o wxscintilla_LexErrorList.o wxscintilla_LexEScript.o wxscintilla_LexFlagship.o wxscintilla_LexForth.o wxscintilla_LexFortran.o wxscintilla_LexGAP.o wxscintilla_LexGui4Cli.o wxscintilla_LexHaskell.o wxscintilla_LexHex.o wxscintilla_LexHTML.o wxscintilla_LexInno.o wxscintilla_LexJSON.o wxscintilla_LexKix.o wxscintilla_LexKVIrc.o wxscintilla_LexLaTeX.o wxscintilla_LexLisp.o wxscintilla_LexLout.o wxscintilla_LexLua.o wxscintilla_LexMagik.o wxscintilla_LexMake.o wxscintilla_LexMarkdown.o wxscintilla_LexMatlab.o wxscintilla_LexMetapost.o wxscintilla_LexMMIXAL.o wxscintilla_LexModula.o wxscintilla_LexMPT.o wxscintilla_LexMSSQL.o wxscintilla_LexMySQL.o wxscintilla_LexNimrod.o wxscintilla_LexNsis.o wxscintilla_LexNull.o wxscintilla_LexOpal.o wxscintilla_LexOScript.o wxscintilla_LexPascal.o wxscintilla_LexPB.o wxscintilla_LexPerl.o wxscintilla_LexPLM.o wxscintilla_LexPO.o wxscintilla_LexPOV.o wxscintilla_LexPowerPro.o wxscintilla_LexPowerShell.o wxscintilla_LexProgress.o wxscintilla_LexProps.o wxscintilla_LexPS.o wxscintilla_LexPython.o wxscintilla_LexR.o wxscintilla_LexRebol.o wxscintilla_LexRegistry.o wxscintilla_LexRuby.o wxscintilla_LexRust.o wxscintilla_LexScriptol.o wxscintilla_LexSmalltalk.o wxscintilla_LexSML.o wxscintilla_LexSorcus.o wxscintilla_LexSpecman.o wxscintilla_LexSpice.o wxscintilla_LexSQL.o wxscintilla_LexSTTXT.o wxscintilla_LexTACL.o wxscintilla_LexTADS3.o wxscintilla_LexTAL.o wxscintilla_LexTCL.o wxscintilla_LexTCMD.o wxscintilla_LexTeX.o wxscintilla_LexTxt2tags.o wxscintilla_LexVB.o wxscintilla_LexVerilog.o wxscintilla_LexVHDL.o wxscintilla_LexVisualProlog.o wxscintilla_LexYAML.o wxscintilla_Accessor.o wxscintilla_CharacterCategory.o wxscintilla_CharacterSet.o wxscintilla_LexerBase.o wxscintilla_LexerModule.o wxscintilla_LexerNoExceptions.o wxscintilla_LexerSimple.o wxscintilla_PropSetSimple.o wxscintilla_StyleContext.o wxscintilla_WordList.o wxscintilla_AutoComplete.o wxscintilla_CallTip.o wxscintilla_CaseConvert.o wxscintilla_CaseFolder.o wxscintilla_Catalogue.o wxscintilla_CellBuffer.o wxscintilla_CharClassify.o wxscintilla_ContractionState.o wxscintilla_Decoration.o wxscintilla_Document.o wxscintilla_EditModel.o wxscintilla_EditView.o wxscintilla_Editor.o wxscintilla_ExternalLexer.o wxscintilla_Indicator.o wxscintilla_KeyMap.o wxscintilla_LineMarker.o wxscintilla_MarginView.o wxscintilla_PerLine.o wxscintilla_PositionCache.o wxscintilla_RESearch.o wxscintilla_RunStyles.o wxscintilla_ScintillaBase.o wxscintilla_Selection.o wxscintilla_Style.o wxscintilla_UniConversion.o wxscintilla_ViewStyle.o wxscintilla_XPM.o
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/bk-deps g++ -c -o basedll_unichar.o   -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/regex  -I/tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/wx/include/gtk3-unicode-3.1 -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread  -D__WXGTK__      -DWXBUILDING -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  -fvisibility=hidden -fvisibility-inlines-hidden   /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/common/unichar.cpp
#6 304.1     In file included from /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/common/string.cpp:36:
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h: In function 'long int wxStrtol_lA(const char*, char**, int, const wxXLocale&)':
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:243:45: error: 'strtol_l' was not declared in this scope; did you mean 'strtold_l'?
#6 304.1       243 |     #define wxCRT_Strtol_lA wxXLOCALE_IDENT(strtol_l)
#6 304.1           |                                             ^~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:59:39: note: in definition of macro 'wxXLOCALE_IDENT'
#6 304.1        59 |         #define wxXLOCALE_IDENT(name) name
#6 304.1           |                                       ^~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:249:18: note: in expansion of macro 'wxCRT_Strtol_lA'
#6 304.1       249 |         { return wxCRT_Strtol_lA(c, endptr, base, loc.Get()); }
#6 304.1           |                  ^~~~~~~~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h: In function 'long unsigned int wxStrtoul_lA(const char*, char**, int, const wxXLocale&)':
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:244:46: error: 'strtoul_l' was not declared in this scope; did you mean 'strtoull'?
#6 304.1       244 |     #define wxCRT_Strtoul_lA wxXLOCALE_IDENT(strtoul_l)
#6 304.1           |                                              ^~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:59:39: note: in definition of macro 'wxXLOCALE_IDENT'
#6 304.1        59 |         #define wxXLOCALE_IDENT(name) name
#6 304.1           |                                       ^~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:251:18: note: in expansion of macro 'wxCRT_Strtoul_lA'
#6 304.1       251 |         { return wxCRT_Strtoul_lA(c, endptr, base, loc.Get()); }
#6 304.1           |                  ^~~~~~~~~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h: In function 'double wxStrtod_l(const wchar_t*, wchar_t**, const wxXLocale&)':
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:300:49: error: 'wcstod_l' was not declared in this scope; did you mean 'wcstoull'?
#6 304.1       300 |         #define wxCRT_Strtod_lW wxXLOCALE_IDENT(wcstod_l)
#6 304.1           |                                                 ^~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:59:39: note: in definition of macro 'wxXLOCALE_IDENT'
#6 304.1        59 |         #define wxXLOCALE_IDENT(name) name
#6 304.1           |                                       ^~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:305:22: note: in expansion of macro 'wxCRT_Strtod_lW'
#6 304.1       305 |             { return wxCRT_Strtod_lW(c, endptr, loc.Get()); }
#6 304.1           |                      ^~~~~~~~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h: In function 'long int wxStrtol_l(const wchar_t*, wchar_t**, int, const wxXLocale&)':
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:301:49: error: 'wcstol_l' was not declared in this scope; did you mean 'wcstoll'?
#6 304.1       301 |         #define wxCRT_Strtol_lW wxXLOCALE_IDENT(wcstol_l)
#6 304.1           |                                                 ^~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:59:39: note: in definition of macro 'wxXLOCALE_IDENT'
#6 304.1        59 |         #define wxXLOCALE_IDENT(name) name
#6 304.1           |                                       ^~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:307:22: note: in expansion of macro 'wxCRT_Strtol_lW'
#6 304.1       307 |             { return wxCRT_Strtol_lW(c, endptr, base, loc.Get()); }
#6 304.1           |                      ^~~~~~~~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h: In function 'long unsigned int wxStrtoul_l(const wchar_t*, wchar_t**, int, const wxXLocale&)':
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:302:50: error: 'wcstoul_l' was not declared in this scope; did you mean 'wcstoull'?
#6 304.1       302 |         #define wxCRT_Strtoul_lW wxXLOCALE_IDENT(wcstoul_l)
#6 304.1           |                                                  ^~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:59:39: note: in definition of macro 'wxXLOCALE_IDENT'
#6 304.1        59 |         #define wxXLOCALE_IDENT(name) name
#6 304.1           |                                       ^~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include/wx/xlocale.h:309:22: note: in expansion of macro 'wxCRT_Strtoul_lW'
#6 304.1       309 |             { return wxCRT_Strtoul_lW(c, endptr, base, loc.Get()); }
#6 304.1           |                      ^~~~~~~~~~~~~~~~
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/bk-deps g++ -c -o basedll_uri.o   -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/regex  -I/tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/wx/include/gtk3-unicode-3.1 -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread  -D__WXGTK__      -DWXBUILDING -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  -fvisibility=hidden -fvisibility-inlines-hidden   /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/common/uri.cpp
#6 304.1     /tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/bk-deps g++ -c -o basedll_ustring.o   -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/regex  -I/tmp/pip-install-J_zZjn/wxPython/build/wxbld/gtk3/lib/wx/include/gtk3-unicode-3.1 -I/tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread  -D__WXGTK__      -DWXBUILDING -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -fPIC -DPIC -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  -fvisibility=hidden -fvisibility-inlines-hidden   /tmp/pip-install-J_zZjn/wxPython/ext/wxWidgets/src/common/ustring.cpp
#6 304.1     make: *** [Makefile:26305: basedll_string.o] Error 1
#6 304.1     make: *** Waiting for unfinished jobs....
#6 304.1     Error building
#6 304.1     ERROR: failed building wxWidgets
#6 304.1     Traceback (most recent call last):
#6 304.1       File "build.py", line 1510, in cmd_build_wx
#6 304.1         wxbuild.main(wxDir(), build_options)
#6 304.1       File "/tmp/pip-install-J_zZjn/wxPython/buildtools/build_wxwidgets.py", line 496, in main
#6 304.1         exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
#6 304.1       File "/tmp/pip-install-J_zZjn/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
#6 304.1         raise builder.BuildError(msg)
#6 304.1     BuildError
#6 304.1     Finished command: build_wx (4.506s)
#6 304.1     Finished command: build (4.506s)
#6 304.1     Command '"/usr/local/bin/python" -u build.py build' failed with exit code 1.
#6 304.1     ----------------------------------------
#6 304.8 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-J_zZjn/wxPython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-J_zZjn/wxPython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-u0ZgEQ/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /root/.local/include/python2.7/wxPython Check the logs for full command output.
#6 305.3 WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
#6 305.3 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c pip install --user         wxPython]: exit code: 1

What could be the problem?

My Dockerfile for reference:

FROM python:2-alpine

RUN apk add\
    build-base\
    gcc\
    git-svn\
    gtk+3.0\
    g++\
    jpeg-dev\
    libc-dev\
    python-dev\
    wxgtk\
    wxgtk-dev\
    zlib-dev

RUN pip install\
        wxPython

First, do you really need Python2? It's been EOL for two and a half years.

Second, it's trying to build from source because there are not any binary wheels for Linux in PyPI, and something is going wrong with the build. (Probably something like unexpected compiler configuration or flags, missing dependencies, etc.) You may want to change your pip command to fetch the wheel from extras.wxpython.org, something like this:

pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/centos-7 wxPython==4.0.0

I'm not sure which build will be most compatible with alpine, so you may need to try one of the others available besides centos-7. Poke around on extras.wxpython.org to see what else is available. Or you can base your docker image on one of the other distros instead to get better compatibility. You will probably have better luck letting pip build wxPython from source in those cases too.

The specific version used above is needed because 4.0.7 is the last build available for Python 2.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM