已有184人关注
安装wxpython是 跳出这么长一串代码是什么原因
发表在Python图书答疑 2022-06-02 《零基础学Python-3.8》第12章 GUI界面编程——源码
是否精华
版块置顶:

Collecting wxpython

  Using cached wxPython-4.1.1.tar.gz (66.0 MB)

  Preparing metadata (setup.py) ... done

Requirement already satisfied: pillow in d:\python\lib\site-packages (from wxpython) (9.1.1)

Requirement already satisfied: six in d:\python\lib\site-packages (from wxpython) (1.16.0)

Requirement already satisfied: numpy in d:\python\lib\site-packages (from wxpython) (1.22.4)

Using legacy 'setup.py install' for wxpython, since package 'wheel' is not installed.

Installing collected packages: wxpython

  Running setup.py install for wxpython ... error

  error: subprocess-exited-with-error


  × Running setup.py install for wxpython did not run successfully.

  │ exit code: 1

  ╰─> [51 lines of output]

      D:\python\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead

        warnings.warn(

      D:\python\lib\site-packages\setuptools\dist.py:294: DistDeprecationWarning: use_2to3 is ignored.

        warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)

      running install

      running build

      C:\Users\Administrator\AppData\Local\Temp\pip-install-lweo92j6\wxpython_e0ec46e656c84516bca24e2d2ffb0dd0\build.py:41: 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: "D:\python\python.exe"

      3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]

      Python's architecture is 64bit

      cfg.VERSION: 4.1.1


      Running command: build

      Running command: build_wx

      Command '"D:\python\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 "D:\python\lib\distutils\msvc9compiler.py", line 371, in initialize


          vc_env = query_vcvarsall(VERSION, plat_spec)


        File "D:\python\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall


          return EnvironmentInfo(arch, ver).return_env()


        File "D:\python\lib\site-packages\setuptools\msvc.py", line 1740, in return_env


          [self.VCIncludes,


        File "D:\python\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes


          return [join(self.si.VCInstallDir, 'Include'),


        File "D:\python\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir


          raise distutils.errors.DistutilsPlatformError(msg)


      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

      Finished command: build_wx (0.237s)

      Finished command: build (0.237s)

      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.


      "D:\python\python.exe" -u build.py build

      Command '"D:\python\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


note: This is an issue with the package mentioned above, not pip.

hint: See above for output from the failure.


分享到:
精彩评论 2
高亮天空_1654176349
学分:232 LV4
2022-06-09
沙发

要么出错了,要么在自检

game99258
学分:2266 LV10
2022-06-12
板凳

出错了

首页上一页 1 下一页尾页 2 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照