【发布时间】:2018-07-27 14:52:56
【问题描述】:
我尝试在我的 Linux CentOS 7.3 上安装 PyTorch。我下载了它的包,运行了这个命令,得到了这个错误:
sudo python setup.py install
running install
running build_deps
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.0 or higher is required. You are running version 2.8.12.2
-- Configuring incomplete, errors occurred!
所以我尝试使用命令安装 CMake 3
sudo yum -y install cmake3
安装顺利,但系统默认还是使用cmake2.8。 如果我输入 yum info 命令,我会得到:
sudo yum info cmake
Installed Packages
Name : cmake
Arch : x86_64
Version : 2.8.12.2
Release : 2.el7
Size : 27 M
Repo : installed
From repo : base
Summary : Cross-platform make system
URL : http://www.cmake.org
License : BSD and MIT and zlib
Description : CMake is used to control the software compilation process using simple
: platform and compiler independent configuration files. CMake generates
: native makefiles and workspaces that can be used in the compiler
: environment of your choice. CMake is quite sophisticated: it is possible
: to support complex environments requiring system configuration, preprocessor
: generation, code generation, and template instantiation.
所以,问题很明显:系统仍将 cmake2.8 视为默认设置,因此 Python 不使用 cmake3 进行 PyTorch 安装。 我该如何解决这个问题?
谢谢
【问题讨论】:
标签: python-2.7 cmake centos centos7 pytorch