快盘下载:好资源、好软件、快快下载吧!

快盘排行|快盘最新

当前位置:首页软件教程电脑软件教程 → 已经安装vs依然显示error:-Microsoft-Visual-C++-14.0-or-greater-is-required.

已经安装vs依然显示error:-Microsoft-Visual-C++-14.0-or-greater-is-required.

时间:2022-11-18 14:56:35人气:作者:快盘下载我要评论

报错信息

在 Windows 下的 Conda 环境中pip install一些需要现场编译的库时经常会报错;

  Building wheel for pyopenjtalk (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: ;D:Miniconda3envsdlpython.exe; ;D:Miniconda3envsdllibsite-packagespip_vendorpep517in_process_in_process.py; build_wheel ;C:UsersAdministratorAppDataLocalTemp	mpvdg4l0qp;
       cwd: C:UsersAdministratorAppDataLocalTemppip-install-jpy19xi8pyopenjtalk_5c83910e21044265aad3fbfcb35bbc2e
  Complete output (21 lines):
  fatal: not a git repository (or any of the parent directories): .git
  running bdist_wheel
  running build
  running build_py
  -- Building version 0.3.0
  creating buildlib.win-amd64-3.7
  creating buildlib.win-amd64-3.7pyopenjtalk
  copying pyopenjtalkutils.py -> buildlib.win-amd64-3.7pyopenjtalk
  copying pyopenjtalkversion.py -> buildlib.win-amd64-3.7pyopenjtalk
  copying pyopenjtalk__init__.py -> buildlib.win-amd64-3.7pyopenjtalk
  creating buildlib.win-amd64-3.7pyopenjtalkhtsvoice
  copying pyopenjtalkhtsvoiceLICENSE_mei_normal.htsvoice -> buildlib.win-amd64-3.7pyopenjtalkhtsvoice
  copying pyopenjtalkhtsvoicemei_normal.htsvoice -> buildlib.win-amd64-3.7pyopenjtalkhtsvoice
  copying pyopenjtalkhtsvoiceREADME.md -> buildlib.win-amd64-3.7pyopenjtalkhtsvoice
  running build_ext
  skipping ;pyopenjtalkopenjtalk.cpp; Cython extension (up-to-date)
  skipping ;pyopenjtalkhtsengine.cpp; Cython extension (up-to-date)
  building ;pyopenjtalk.openjtalk; extension
  setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
  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 pyopenjtalk
Failed to build pyopenjtalk
ERROR: Could not build wheels for pyopenjtalk, which is required to install pyproject.toml-based projects

上图为安装pyopenjtalk时的报错信息。

规避方法

我之前遇到这种问题的解决方法是直接下载已经在Windows上编译好的whl文件;然后;

pip install xxx.whl

然而该网站并没有编译好的pyopenjtalk包;因此这次必须解决该错误。

问题原因

根据微软官方问答平台中的说法;应该是Conda环境下pip的构建工具选择错误。

解决方法

pip install之前执行;

SET DISTUTILS_USE_SDK=1 & ;C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCAuxiliaryBuildvcvarsall.bat; x64

注意vcvarsall.bat的路径因人而异。

至于为什么要这么做;可以参考下sklearn的高级安装文档。

网友评论

快盘下载暂未开通留言功能。

关于我们| 广告联络| 联系我们| 网站帮助| 免责声明| 软件发布

Copyright 2019-2029 【快快下载吧】 版权所有 快快下载吧 | 豫ICP备10006759号公安备案:41010502004165

声明: 快快下载吧上的所有软件和资料来源于互联网,仅供学习和研究使用,请测试后自行销毁,如有侵犯你版权的,请来信指出,本站将立即改正。