为python windows安装cmake时出错

Mar*_*jka 0 python pip cmake

我有 Windows 10 和新的 Python 3.6.1。我试图安装包 Cmake 0.6.0(需要另一个包,atari-py)使用

pip install cmake
Run Code Online (Sandbox Code Playgroud)

但我遇到了一个错误。

我安装了以下软件包:pip、scikit-build、setuptools、wheel、pybdist。我的帐户名中确实有一个外来符号(经验教训),但是在安装其他软件包时它可以正常工作。我不是一个熟练的 Windows 管理员。

Collecting cmake
  Using cached cmake-0.6.0.tar.gz
Building wheels for collected packages: cmake
  Running setup.py bdist_wheel for cmake: started
  Running setup.py bdist_wheel for cmake: finished with status 'error'
  Complete output from command C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\?ejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\EJKIS~1\AppData\Local\Temp\tmp3br7eri7pip-wheel- --python-tag cp36:
  Traceback (most recent call last):
    File "C:\Python\Python36-32\lib\site-packages\skbuild\setuptools_wrap.py", line 405, in setup
      cmkr = cmaker.CMaker()
    File "C:\Python\Python36-32\lib\site-packages\skbuild\cmaker.py", line 67, in __init__
      "Problem with the CMake installation, aborting build.")

  Problem with the CMake installation, aborting build.

  ----------------------------------------
  Running setup.py clean for cmake
Failed to build cmake
Installing collected packages: cmake
  Running setup.py install for cmake: started
    Running setup.py install for cmake: finished with status 'error'
    Complete output from command C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\?ejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EJKIS~1\AppData\Local\Temp\pip-5ql_x35g-record\install-record.txt --single-version-externally-managed --compile:
    Traceback (most recent call last):
      File "C:\Python\Python36-32\lib\site-packages\skbuild\setuptools_wrap.py", line 405, in setup
        cmkr = cmaker.CMaker()
      File "C:\Python\Python36-32\lib\site-packages\skbuild\cmaker.py", line 67, in __init__
        "Problem with the CMake installation, aborting build.")

    Problem with the CMake installation, aborting build.

    ----------------------------------------

  Failed building wheel for cmake
Command "C:\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\?ejkis\\AppData\\Local\\Temp\\pycharm-packaging1\\cmake\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EJKIS~1\AppData\Local\Temp\pip-5ql_x35g-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\?ejkis\AppData\Local\Temp\pycharm-packaging1\cmake\
Run Code Online (Sandbox Code Playgroud)

Pre*_*ele 6

python -m pip install --upgrade pip

然后你可以运行

pip3 install cmake

这对我来说适用于 Pyhton 3.8


小智 5

如果 pip3 或 pip install cmake 的上述答案不起作用,请尝试

sudo apt-get 安装 cmake