简体   繁体   中英

I tried to install wxpython but it did not work

So I tried following a tutorial from answers to thos question How to properly install wxPython?

Install python 3xxx in your system opting (Add 3xxx to your path).

I had it installed by now

open python CLI to see whether python is working or not.>>then open command prompt (CMD).

What is python CLI? How do I check if it works or not?

type PIP to see whether pip is installed or not.

It was installed, version 20.1.1

enter command: pip install wheel

It was successfully installed

enter command: pip install pygame

After downloading the package it gave me this:

     command: 'e:\prg\inkscape\bin\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-hn5zcy3g\\pygame\\setup.py'"'"'; __file__='"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-hn5zcy3g\\pygame\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\irbis\AppData\Local\Temp\pip-pip-egg-info-o4vuki0n'
         cwd: C:\Users\irbis\AppData\Local\Temp\pip-install-hn5zcy3g\pygame\
    Complete output (17 lines):


    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using WINDOWS configuration...


    Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\irbis\AppData\Local\Temp\pip-install-hn5zcy3g\pygame\setup.py", line 194, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "C:\Users\irbis\AppData\Local\Temp\pip-install-hn5zcy3g\pygame\buildconfig\config.py", line 210, in main
        deps = CFG.main(**kwds)
      File "C:\Users\irbis\AppData\Local\Temp\pip-install-hn5zcy3g\pygame\buildconfig\config_win.py", line 576, in main
        and download_win_prebuilt.ask(**download_kwargs):
      File "C:\Users\irbis\AppData\Local\Temp\pip-install-hn5zcy3g\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
        reply = raw_input(
    EOFError: EOF when reading a line
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```
>To install wxpython enter command : pip install -U wxPython

This one gave me an error as well:

```Running setup.py install for wxPython ... error
    ERROR: Command errored out with exit status 1:
     command: 'e:\prg\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-i_c51shd\\wxPython\\setup.py'"'"'; __file__='"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-i_c51shd\\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\irbis\AppData\Local\Temp\pip-record-i_otwe8t\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\prg\inkscape\include\python3.8\wxPython'
         cwd: C:\Users\irbis\AppData\Local\Temp\pip-install-i_c51shd\wxPython\
    Complete output (25 lines):
    running install
    running build
    Will build using: "E:\prg\inkscape\bin\python.exe"
    3.8.2 (default, Apr  9 2020, 13:17:39)  [GCC 9.3.0 64 bit (AMD64)]
    Python's architecture is 64bit
    cfg.VERSION: 4.1.0

    Running command: build
    Running command: build_wx
    Command '"E:\prg\inkscape\bin\python.exe" -c "import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "E:\prg\inkscape\lib\python3.8\distutils\msvc9compiler.py", line 330, in __init__
        raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
    distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
    Finished command: build_wx (0.474s)
    Finished command: build (0.474s)
    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.

    "e:\prg\inkscape\bin\python.exe" -u build.py build
    Command '"e:\prg\inkscape\bin\python.exe" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\prg\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-i_c51shd\\wxPython\\setup.py'"'"'; __file__='"'"'C:\\Users\\irbis\\AppData\\Local\\Temp\\pip-install-i_c51shd\\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\irbis\AppData\Local\Temp\pip-record-i_otwe8t\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\prg\inkscape\include\python3.8\wxPython' Check the logs for full command output.```

It looks like you are trying to install wxPython to the Python that is included with Inkscape. This probably won't work.

Download and install Python 3 from either www.python.org or the Microfot Store. Then try installing wxPython using that Python, NOT the one that came with Inkscape.

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