首页 > 解决方案 > 为什么在安装 slycot 时出现此 CMAKE_C_COMPILER 错误?

问题描述

早上好/晚上好,

我正在尝试通过 pip install 安装 slycot。不幸的是,我收到以下错误消息。

我已经安装了 CMake。关于如何解决这个问题的任何想法?

谢谢

slycot (PEP 517) 的构建轮...错误错误:命令错误退出状态为 1:命令:'c:\users\francescos\python38\python.exe''c:\users\francescos\python38\lib\站点包\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\FRANCE~1\AppData\Local\Temp\tmp96ecekd1' cwd: C:\Users\FRANCESCOS\AppData\Local\Temp\pip-install-o1zu4kc_\ slycot_1832234bc3214bdf8ec3b243db79b538 完整输出(56 行):不搜索命令行中给出的未使用变量。-- C 编译器标识未知 CMakeLists.txt:3 (ENABLE_LANGUAGE) 处的 CMake 错误:CMAKE_C_COMPILER:

  cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line.  This environment is
unable to invoke the cl compiler.  To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

-- 配置不完整,出现错误!另请参见“C: /Users/FRANCESCOS/AppData/Local/Temp/pip-install-o1zu4kc_/slycot_1832234bc3214bdf8ec3b243db79b538/cmake_test_compile/build/CMakeFiles/CMakeOutput.log”。另请参阅“C:/Users/FRANCESCOS/AppData/Local/Temp/pip-install-o1zu4kc/slycot_1832234bc3214bdf8ec3b243db79b538/_cmake_test_compile/build/CMakeFiles/CMakeError.log"。FC ('-DCMAKE_Fortran_COMPILER=', 'c:/users/francescos/python38/Library/bin/flang.exe') F2PY ('-DF2PY_EXECUTABLE=', ' c:/users/francescos/python38/Scripts/f2py.exe') NUMPY_INCLUDE ('-DNumPy_INCLUDE_DIR=', 'c:/users/francescos/python38/Include') ['-DSLYCOT_VERSION:STRING=0.4.0', ' -DGIT_REVISION:STRING=ac0944b363a6cfcc0c3d5128cdd484d74173aa3b', '-DISRELEASE:STRING=True', '-DFULL_VERSION=0.4.0.gitac0944b', '-GNMake Makefiles', '-DCMAKE_Fortran_COMPILER=c:/users/francescos/python38 /flang.exe', '-DF2PY_EXECUTABLE=c:/users/francescos/python38/Scripts/f2py.exe', '-DNumPy_INCLUDE_DIR=c:/users/francescos/python38/Include', '-DCMAKE_Fortran_SIMULATE_VERSION=5.0.0', '-DCMAKE_Fortran_COMPILER_ID=法兰', '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']

scikit-build 无法为您的系统获取工作生成器。中止构建。

为 Python 3.8 构建 windows 轮子需要 Microsoft Visual Studio 2017。使用“Visual Studio 2017”获取它:

https://visualstudio.microsoft.com/vs/


错误:为 slycot 构建轮子失败 未能构建 slycot 错误:无法为使用 PEP 517 且无法直接安装的 slycot 构建轮子

标签: pythoncmakepip

解决方案


推荐阅读