无法安装 numpy - 需要 MS Visual C++ 14.1。但是已经安装了

2023-11-29

我在 Windows 10 上使用 pypy3.6-v7.3.0。我正在尝试安装 numpypip install numpy,但我不断收到错误:error: Microsoft Visual C++ 14.1 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/.

不过,我已经安装了 Visual Studio Community 2019,并且我的 C++ 构建工具完全是最新的。

Edit:

这是手动安装构建工具后出现的新错误:

Collecting numpy
  Using cached https://files.pythonhosted.org/packages/2d/f3/795e50e3ea2dc7bc9d1a2eeea9997d5dce63b801e08dfc37c2efce341977/numpy-1.18.4.zip
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    Complete output from command C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\pypy3.exe C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\site-packages\pip-19.0.3-py3.6.egg\pip\_vendor\pep517\_in_process.py prepare_metadata_for_build_wheel C:\Users\Chris\AppData\Local\Temp\tmpjxmz4c4z:
    Processing numpy/random\_bounded_integers.pxd.in
    Processing numpy/random\mtrand.pyx
    Processing numpy/random\_bit_generator.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
    blas_opt_info:
    blas_mkl_info:
    customize MSVCCompiler
      libraries mkl_rt not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    blis_info:
      libraries blis not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    openblas_info:
      libraries openblas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
    get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
    customize GnuFCompiler
    Could not locate executable g77
    Could not locate executable f77
    customize IntelVisualFCompiler
    Could not locate executable ifort
    Could not locate executable ifl
    customize AbsoftFCompiler
    Could not locate executable f90
    customize CompaqVisualFCompiler
    Could not locate executable DF
    customize IntelItaniumVisualFCompiler
    Could not locate executable efl
    customize Gnu95FCompiler
    Could not locate executable gfortran
    Could not locate executable f95
    customize G95FCompiler
    Could not locate executable g95
    customize IntelEM64VisualFCompiler
    customize IntelEM64TFCompiler
    Could not locate executable efort
    Could not locate executable efc
    customize PGroupFlangCompiler
    Could not locate executable flang
    don't know how to compile Fortran code on platform 'nt'
      NOT AVAILABLE

    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries tatlas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    atlas_3_10_blas_info:
      libraries satlas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    atlas_blas_info:
      libraries f77blas,cblas,atlas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    accelerate_info:
      NOT AVAILABLE

    blas_info:
      libraries blas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    blas_src_info:
      NOT AVAILABLE

      NOT AVAILABLE

    non-existing path in 'numpy\\distutils': 'site.cfg'
    lapack_opt_info:
    lapack_mkl_info:
      libraries mkl_rt not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    openblas_lapack_info:
      libraries openblas not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    openblas_clapack_info:
      libraries openblas,lapack not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    flame_info:
      libraries flame not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries lapack_atlas not found in C:\
      libraries tatlas,tatlas not found in C:\
      libraries lapack_atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
      libraries tatlas,tatlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
      libraries lapack_atlas not found in C:\
      libraries satlas,satlas not found in C:\
      libraries lapack_atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
      libraries satlas,satlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
      libraries lapack_atlas not found in C:\
      libraries ptf77blas,ptcblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
      libraries ptf77blas,ptcblas,atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
      libraries lapack_atlas not found in C:\
      libraries f77blas,cblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
      libraries f77blas,cblas,atlas not found in C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\libs
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    lapack_info:
      libraries lapack not found in ['C:\\', 'C:\\Users\\Chris\\AppData\\Local\\Programs\\Python\\pypy3.6-v7.3.0-win32\\libs']
      NOT AVAILABLE

    lapack_src_info:
      NOT AVAILABLE

      NOT AVAILABLE

    running dist_info
    running build_src
    build_src
    building py_modules sources
    creating build
    creating build\src.win32-3.6
    creating build\src.win32-3.6\numpy
    creating build\src.win32-3.6\numpy\distutils
    building library "npymath" sources
    Running from numpy source directory.
    setup.py:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      run_build = parse_setuppy_commands()
    C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\system_info.py:1896: 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:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\system_info.py:1896: 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:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\system_info.py:1896: 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:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\system_info.py:1730: 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:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\system_info.py:1730: 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))()
    C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    Traceback (most recent call last):
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\site-packages\pip-19.0.3-py3.6.egg\pip\_vendor\pep517\_in_process.py", line 207, in <module>
        main()
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\site-packages\pip-19.0.3-py3.6.egg\pip\_vendor\pep517\_in_process.py", line 197, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\site-packages\pip-19.0.3-py3.6.egg\pip\_vendor\pep517\_in_process.py", line 69, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "C:\Users\Chris\AppData\Local\Temp\pip-build-env-pt1e0dfd\overlay\site-packages\setuptools\build_meta.py", line 158, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "C:\Users\Chris\AppData\Local\Temp\pip-build-env-pt1e0dfd\overlay\site-packages\setuptools\build_meta.py", line 250, in run_setup
        self).run_setup(setup_script=setup_script)
      File "C:\Users\Chris\AppData\Local\Temp\pip-build-env-pt1e0dfd\overlay\site-packages\setuptools\build_meta.py", line 143, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 488, in <module>
        setup_package()
      File "setup.py", line 480, in setup_package
        setup(**metadata)
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\core.py", line 171, in setup
        return old_setup(**new_attr)
      File "C:\Users\Chris\AppData\Local\Temp\pip-build-env-pt1e0dfd\overlay\site-packages\setuptools\__init__.py", line 161, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\Chris\AppData\Local\Temp\pip-build-env-pt1e0dfd\overlay\site-packages\setuptools\command\dist_info.py", line 31, in run
        egg_info.run()
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\command\egg_info.py", line 26, in run
        self.run_command("build_src")
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\lib-python\3\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\command\build_src.py", line 146, in run
        self.build_sources()
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\command\build_src.py", line 157, in build_sources
        self.build_library_sources(*libname_info)
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\command\build_src.py", line 290, in build_library_sources
        sources = self.generate_sources(sources, (lib_name, build_info))
      File "C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy\numpy\distutils\command\build_src.py", line 380, in generate_sources
        source = func(extension, build_dir)
      File "numpy\core\setup.py", line 661, in get_mathlib_info
        raise RuntimeError("Broken toolchain: cannot link a simple C program")
    RuntimeError: Broken toolchain: cannot link a simple C program

    ----------------------------------------
Command "C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\pypy3.exe C:\Users\Chris\AppData\Local\Programs\Python\pypy3.6-v7.3.0-win32\site-packages\pip-19.0.3-py3.6.egg\pip\_vendor\pep517\_in_process.py prepare_metadata_for_build_wheel C:\Users\Chris\AppData\Local\Temp\tmpjxmz4c4z" failed with error code 1 in C:\Users\Chris\AppData\Local\Temp\pip-install-1iwlc8lz\numpy

我不再看到原来的错误了,无论现在发生什么,我总是会遇到这个错误。我尝试使用pip install numpy, pip3 install numpy, and pypy -m pip install numpy。全部给出相同的输出。


  1. 如果您的构建工具无法解决您的问题,请尝试通过此手动安装构建工具link.

  2. 之后您必须重新启动您的电脑或笔记本电脑。

  3. 然后尝试pip3 install numpy。在 python 3.x 版本中我们使用pip3 not pip.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法安装 numpy - 需要 MS Visual C++ 14.1。但是已经安装了 的相关文章

随机推荐

  • Golang 中的类型转换

    我正在阅读以下文章 https www ribice ba golang enums 代码示例之一中定义了一个函数 func lt LeaveType UnmarshalJSON b byte error Define a secondar
  • 用于文本选择控件的自定义浮动工具栏

    我想自定义选择文本时出现的浮动工具栏 这是标准浮动工具栏的示例 你知道我如何定制它 比如添加粗体 斜体 吗 有外部图书馆吗 Monospace 应用程序正是我想要的 您将向清单中的活动添加一个意图过滤器
  • Flask Postgresql 数组不会永久更新

    我正在开发一个使用 Flask 和 PostgreSQL 数据库以及 SQLAlchemy 的项目 I have Group具有以下列表的对象User属于该组成员的 ID 由于某种原因 当我尝试将 ID 添加到组时 它无法正确保存 如果我尝
  • 谷歌折线图 X 轴上有双标签

    我正在研究谷歌折线图 我想在 x 轴上加双标签 日期明智的过程 我可以使用下面的代码绘制没有日期的图表 但无法填充日期 div style width 100 height 1 div
  • 错误:getaddrinfo ENOTFOUNDregistry.npmjs.orgregistry.npmjs.org:443

    我正在公司网络上工作 正在尝试安装npm 但我一次又一次地收到此错误 npm install npm ERR Windows NT 6 1 7601 npm ERR argv C Program Files nodejs node exe
  • 在 Swift 中声明自引用指针[重复]

    这个问题在这里已经有答案了 这段 Obj C 代码在 swift 中的等价物是什么 我猜测 CMutableVoidPointer 的一些事情 static void CapturingStillImageContext Capturing
  • Nhibernate 通过用户定义的函数输出进行过滤

    我对 NHibernate 相当陌生 到目前为止一切都进展顺利 但我遇到了一个问题 我不太确定如何解决 基本上我需要按用户定义函数的输出进行过滤 如果我用 SQL 编写 我会这样写 declare Latitude decimal decl
  • Coldfusion 8 同时执行 CFIf 和 CFElse 语句

    我正在为电子商务网站制作用户注册应用程序 但我遇到了一个非常奇怪的问题 当我运行这段代码时
  • C++ 中的临时对象确实是 const 吗?

    我一直认为C 中的临时对象会被编译器自动视为const 但最近我经历了以下代码示例 function returning object some non const method 对 C 编译器有效 这让我想知道 C 中的临时对象确实是 c
  • PHP 匿名函数:未定义的变量

    我有这两个 WordPress 功能 wpb set post views function postID count key wpb post views count count get post meta postID count ke
  • Codeigniter 与本地主机 (XAMPP) 中的路径有关的问题

    无论如何 我的代码点火器安装中的索引页面 又名 homepage php 都工作正常 The problem lies with using subdirectories to store other pages currently its
  • android 中网页视图内容闪烁?

    我在用着this用于水平滑动的 lib 检查下面的代码 滑动功能工作正常 但当我直接滑动时 不会在网页视图上显示内容 显示下面的一些图片以了解更多详细信息 在上图之后 当我滑动时 它效果很好 但是当我们想直接进入下一张幻灯片时 就会面临如下
  • 始终显示 AVPlayer 控件

    我有一个 AVPlayerViewController 里面有一个 AVPlayer 我需要的是播放器的控件 播放 暂停 时间滑块 永远不会隐藏 现在 在播放视频大约 4 秒后 它们就会隐藏起来 您必须点击屏幕才能再次显示它们 我无法找到解
  • 当menuItem中使用shiny和shinydashboard的更多功能时,tabItem无法显示内容

    我正在学习闪亮和闪亮的仪表板 我的代码是这样的 library shiny library shinydashboard library DT library RODBC library stringr library dplyr ch l
  • 如何在 Yesod 应用程序中的 GHCi 中执行数据库查询

    例如 如何使用 Yesod 应用程序的模型将新用户插入数据库 或者 还有更好的方法 我正在处理脚手架应用程序 现在我创建了App实例 但不知道如何使用它执行请求 i Extra data Extra Extra extraCopyright
  • 如何将svg中的一条路径分成两条路径

    我对 svg 语法非常陌生 我想知道如何将一条路径分成两条路径 实际上我有这样的东西 M Xm Ym C Xc1 Yc1 Xc2 Yc2 Xc3 Yc3 C Xd1 Yd1 Xd2 Yd2 Xd3 Yd3 C 是我要分割路径的地方 我想将其
  • Oozie 与 Hadoop 2,作业挂在“RUNNING”状态

    我有一个带有 java 操作节点的工作流程作业 使用 Hadoop 2 1 0 2 0 4 0 38 和 Oozie 3 3 2 2 0 4 0 运行 当我提交作业时 我在 Hadoop 资源管理器屏幕中看到 2 行 1 原职位名称 2 使
  • C++内存模型是否提供有关构造函数操作的保证[关闭]

    Closed 这个问题需要多问focused 目前不接受答案 如何确保新构造的不可变对象可以在 C 线程之间安全共享 C 内存模型是否为构造函数的操作提供保证 当多个线程共享对某个对象的访问并且该对象被修改时 可能会出现竞争危险 这些问题可
  • IIS WCF 服务托管与 Windows 服务

    我们开发了一个 WCF 服务 并希望部署它 我们的客户将使用它basicHttpBinding但我们的内部团队将使用它namedPipesBinding 我们想知道将其托管在 IIS 7 中或使用 Windows 服务是否更好 我们运行了一
  • 无法安装 numpy - 需要 MS Visual C++ 14.1。但是已经安装了

    我在 Windows 10 上使用 pypy3 6 v7 3 0 我正在尝试安装 numpypip install numpy 但我不断收到错误 error Microsoft Visual C 14 1 is required Get i