鱼C论坛

 找回密码
 立即注册
查看: 880|回复: 5

[已解决]wxpython模块安装问题

[复制链接]
发表于 2022-1-27 23:24:11 | 显示全部楼层 |阅读模式
50鱼币
Microsoft Windows [版本 10.0.22000.469]
(c) Microsoft Corporation。保留所有权利。

C:\Users\97055>pip install wxpython -i https://pypi.tuna.tsinghua.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting wxpython
  Using cached https://pypi.tuna.tsinghua.edu.c ... Python-4.1.1.tar.gz (66.0 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\users\97055\appdata\local\programs\python\python310-32\lib\site-packages (from wxpython) (9.0.0)
Requirement already satisfied: six in c:\users\97055\appdata\local\programs\python\python310-32\lib\site-packages (from wxpython) (1.16.0)
Collecting numpy
  Using cached https://pypi.tuna.tsinghua.edu.c ... c0/numpy-1.22.1.zip (11.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Using legacy 'setup.py install' for wxpython, since package 'wheel' is not installed.
Building wheels for collected packages: numpy
  Building wheel for numpy (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\97055\AppData\Local\Programs\Python\Python310-32\python.exe' 'C:\Users\97055\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Windows\TEMP\tmphh5o26x0'
       cwd: C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048
  Complete output (70 lines):
  Running from numpy source directory.
  Processing numpy/random\_bounded_integers.pxd.in
  Processing numpy/random\bit_generator.pyx
  Processing numpy/random\mtrand.pyx
  Processing numpy/random\_bounded_integers.pyx.in
  Processing numpy/random\_common.pyx
  Processing numpy/random\_generator.pyx
  Processing numpy/random\_mt19937.pyx
  Processing numpy/random\_pcg64.pyx
  Processing numpy/random\_philox.pyx
  Processing numpy/random\_sfc64.pyx
  Cythonizing sources
  WARN: Could not locate executable g77
  WARN: Could not locate executable f77
  WARN: Could not locate executable ifort
  WARN: Could not locate executable ifl
  WARN: Could not locate executable f90
  WARN: Could not locate executable DF
  WARN: Could not locate executable efl
  WARN: Could not locate executable gfortran
  WARN: Could not locate executable f95
  WARN: Could not locate executable g95
  WARN: Could not locate executable efort
  WARN: Could not locate executable efc
  WARN: Could not locate executable flang
  WARN: don't know how to compile Fortran code on platform 'nt'
  C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048\numpy\distutils\system_info.py:2077: UserWarning:
      Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.
    if self._calc_info(blas):
  C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    if self._calc_info(blas):
  C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    if self._calc_info(blas):
  C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  C:\Windows\Temp\pip-install-nz5k8a0b\numpy_1d0c56a7a1a4467182971f381afdf048\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  Warning: attempted relative import with no known parent package
  C:\Windows\Temp\pip-build-env-4sk3uihz\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  non-existing path in 'numpy\\distutils': 'site.cfg'
  running bdist_wheel
  running build
  running config_cc
  running config_fc
  running build_src
  creating build
  creating build\src.win32-3.10
  creating build\src.win32-3.10\numpy
  creating build\src.win32-3.10\numpy\distutils
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

大佬们,我模块安装不上,大佬们帮忙分析下,我百度也搜了不行,谢谢!
最佳答案
2022-1-27 23:24:12
稳定版默认下载WHL包,成功概率大

最佳答案

查看完整内容

稳定版默认下载WHL包,成功概率大
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-27 23:24:12 | 显示全部楼层    本楼为最佳答案   
稳定版默认下载WHL包,成功概率大
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-27 23:51:08 | 显示全部楼层
本帖最后由 isdkz 于 2022-1-28 00:37 编辑

有一些扩展库用pip安装的时候再本地编译的,因为wxpython依赖numpy,
numpy是基于C语言写的扩展库,需要本地编译,你缺少vc编译工具所以numpy安装失败,
你可以根据报错提示去安装Microsoft Visual C++ 14.0 或 14.0以上的版本,
你也可以到https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy下载编译好的,
注意根据自己python的版本下载,下载到本地后在你的下载路径下打开cmd然后
pip install 你下载的whl文件名称(注意不要因为它的名字长就给它改了一个名字,改名字有可能会导致出错)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-28 00:40:39 From FishC Mobile | 显示全部楼层
先安装wheel包,再安装wxpython,试试
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-29 08:49:45 | 显示全部楼层
python版本号,谢谢
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-1-29 08:50:15 | 显示全部楼层
不要使用浏览版
老老实实用稳定版
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-12 10:10

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表