Probleme bei Installation wxPython

Probleme bei der Installation?
Antworten
frankwitte
User
Beiträge: 2
Registriert: Dienstag 24. November 2020, 09:15

Ich möchte wxPython unter Python 3.9 aktivieren, unter PyCharm -> Python Interpreter habe ich es hinzugefügt, aber es gibt eine Fehlermeldung:
_______________________________________


Collecting wxPython==4.1.0
Using cached wxPython-4.1.0.tar.gz (65.8 MB)
Requirement already satisfied: pillow in c:\users\frank\pycharmprojects\pythonproject1\venv\lib\site-packages (from wxPython==4.1.0) (8.0.1)
Requirement already satisfied: six in c:\users\frank\pycharmprojects\pythonproject1\venv\lib\site-packages (from wxPython==4.1.0) (1.15.0)
Requirement already satisfied: numpy in c:\users\frank\pycharmprojects\pythonproject1\venv\lib\site-packages (from wxPython==4.1.0) (1.19.4)
Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.
Installing collected packages: wxPython
Running setup.py install for wxPython: started
Running setup.py install for wxPython: finished with status 'error'

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Frank\PycharmProjects\pythonProject1\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Frank\\AppData\\Local\\Temp\\pycharm-packaging\\wxpython\\setup.py'"'"'; __file__='"'"'C:\\Users\\Frank\\AppData\\Local\\Temp\\pycharm-packaging\\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 'C:\Users\Frank\AppData\Local\Temp\pip-record-21v0uu2v\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Frank\PycharmProjects\pythonProject1\venv\include\site\python3.9\wxPython'
cwd: C:\Users\Frank\AppData\Local\Temp\pycharm-packaging\wxpython\
Complete output (36 lines):
running install
running build
Will build using: "C:\Users\Frank\PycharmProjects\pythonProject1\venv\Scripts\python.exe"
3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.1.0

Running command: build
Running command: build_wx
MSVC: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe
wxWidgets build options: ['--wxpython', '--unicode']
creating wx/msw/setup.h from setup0.h
setting build options...
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "C:\Users\Frank\AppData\Local\Temp\pycharm-packaging\wxpython\build.py", line 1471, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "C:\Users\Frank\AppData\Local\Temp\pycharm-packaging\wxpython\buildtools\build_wxwidgets.py", line 449, in main
args.append("COMPILER_VERSION=%s" % getVisCVersion())
File "C:\Users\Frank\AppData\Local\Temp\pycharm-packaging\wxpython\buildtools\build_wxwidgets.py", line 67, in getVisCVersion
text = getoutput("cl.exe")
File "C:\Users\Frank\AppData\Local\Temp\pycharm-packaging\wxpython\buildtools\build_wxwidgets.py", line 164, in getoutput
output = output.decode(outputEncoding)
File "C:\Users\Frank\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 15, in decode
return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 62: character maps to <undefined>
Finished command: build_wx (0m1.911s)
Finished command: build (0m1.911s)
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\Frank\PycharmProjects\pythonProject1\venv\Scripts\python.exe" -u build.py build
Command '"C:\Users\Frank\PycharmProjects\pythonProject1\venv\Scripts\python.exe" -u build.py build' failed with exit code 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Frank\PycharmProjects\pythonProject1\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Frank\\AppData\\Local\\Temp\\pycharm-packaging\\wxpython\\setup.py'"'"'; __file__='"'"'C:\\Users\\Frank\\AppData\\Local\\Temp\\pycharm-packaging\\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 'C:\Users\Frank\AppData\Local\Temp\pip-record-21v0uu2v\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Frank\PycharmProjects\pythonProject1\venv\include\site\python3.9\wxPython' Check the logs for full command output.

________________

Kann mir jemand helfen was ich da tun muss?
Benutzeravatar
sparrow
User
Beiträge: 4144
Registriert: Freitag 17. April 2009, 10:28

Schau mal auf deren Webseite. Dort steht, dass es für bestimmte Python-Versionen vorkompilierte Pakete auf PyPI gibt. Von dort holt sich das auch pip. Und wenn es kein passendes wheel gibt, dann wird versucht den Sourcecode zu kompilieren.

Der Eintrag auf PyPI zeigt, dass wxPython nur für die Python Versionen 3.4, 3.5, 3.6, 3.7 verfügbar ist. Entweder wechselst du auf eine der momentan unterstützten Python-Versionen (also am besten 3.7) oder du musst dich mit dem kompletten Build-Vorgang auseinander setzen weil das kompiliert weren muss.
frankwitte
User
Beiträge: 2
Registriert: Dienstag 24. November 2020, 09:15

ok danke für die Info
Antworten