繁体   English   中英

使用 python2 在 docker 中安装 wxpython

[英]Install wxpython inside docker using python2

作为探索旧应用程序的一种方式,我正在尝试在 Docker 中安装wxPython ,但在安装此软件包时总是出现错误:

#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

可能是什么问题呢?

我的Dockerfile供参考:

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

首先,你真的需要 Python2 吗? 已经停产两年半了。

其次,它试图从源代码构建,因为 PyPI 中没有任何适用于 Linux 的二进制轮子,并且构建出现问题。 (可能是意外的编译器配置或标志、缺少依赖项等)您可能想要更改您的 pip 命令以从 extras.wxpython.org 获取轮子,如下所示:

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

我不确定哪个版本与 alpine 最兼容,因此您可能需要尝试除 centos-7 之外的其他版本之一。 在 extras.wxpython.org 上四处逛逛,看看还有什么可用的。 或者,您可以将 docker 映像基于其他发行版之一,以获得更好的兼容性。 在这些情况下,让 pip 从源代码构建 wxPython 可能会更好。

需要上面使用的特定版本,因为 4.0.7 是 Python 2.7 可用的最后一个版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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