在CentOS上安装Networkit时出错

2024-06-02 08:00:15 发布

您现在位置:Python中文网/ 问答频道 /正文

您好,我正试图在CentOS 7机器上安装Networkit,但出现了几个错误。 请告诉我错误/缺失的内容和/或正确的命令,以便修复错误,好吗?

目前,我的机器中安装了以下设备,这是网络IT安装所必需的:

[JohnRambo@Machine ~]$ g++ --version
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[JohnRambo@Machine ~]$ clang++ --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

[JohnRambo@Machine ~]$ python -V
Python 2.7.5

[JohnRambo@Machine ~]$ which python
/usr/bin/python

[JohnRambo@Machine ~]$ python3 -V
Python 3.6.8

[JohnRambo@Machine ~]$ which python3
/usr/bin/python3

[JohnRambo@Machine ~]$ pip --version
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

[JohnRambo@Machine ~]$ which pip
/usr/bin/pip

[JohnRambo@Machine ~]$ pip3 --version
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 21.2.1 from /home/JohnRambo/.local/lib/python3.6/site-packages/pip (python 3.6)

[JohnRambo@Machine ~]$ which pip3
/usr/bin/pip3

[JohnRambo@Machine ~]$ cmake --version
cmake version 2.8.12.2

[JohnRambo@Machine ~]$ cython --version
Cython version 0.19

[JohnRambo@Machine ~]$ ls -ls /usr/bin/python*
 0 lrwxrwxrwx. 1 root root     7 Jul 22 09:56 /usr/bin/python -> python2
 0 lrwxrwxrwx. 1 root root     9 Jul 22 09:56 /usr/bin/python2 -> python2.7
 8 -rwxr-xr-x. 1 root root  7144 Nov 16  2020 /usr/bin/python2.7
 0 lrwxrwxrwx. 1 root root     9 Jul 22 10:14 /usr/bin/python3 -> python3.6
12 -rwxr-xr-x. 2 root root 11328 Nov 16  2020 /usr/bin/python3.6
 0 lrwxrwxrwx. 1 root root    17 Jul 22 10:15 /usr/bin/python3.6-config -> python3.6m-config
12 -rwxr-xr-x. 2 root root 11328 Nov 16  2020 /usr/bin/python3.6m
 4 -rwxr-xr-x. 1 root root   173 Nov 16  2020 /usr/bin/python3.6m-config
 4 -rwxr-xr-x. 1 root root  3403 Nov 16  2020 /usr/bin/python3.6m-x86_64-config
 0 lrwxrwxrwx. 1 root root    16 Jul 22 10:15 /usr/bin/python3-config -> python3.6-config
[JohnRambo@Machine ~]$ 

然后,一旦我尝试在我的机器上安装Networkit,我会得到以下结果(几个错误):

[JohnRambo@Machine ~]$ pip3.6 install networkit

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.

WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib64/python3.6/site-packages
sysconfig: /usr/lib64/python3.6/site-packages

WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/lib/python3.6/site-packages
sysconfig: /usr/lib/python3.6/site-packages

WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.6m/UNKNOWN
sysconfig: /usr/include/python3.6m/UNKNOWN

WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/bin
sysconfig: /usr/bin

WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local
sysconfig: /usr

WARNING: Additional context:
user = False
home = None
root = None
prefix = None

Defaulting to user installation because normal site-packages is not writeable
Collecting networkit
  Using cached networkit-9.0.tar.gz (3.2 MB)
Requirement already satisfied: scipy in ./.local/lib/python3.6/site-packages (from networkit) (1.5.4)
Requirement already satisfied: numpy in ./.local/lib/python3.6/site-packages (from networkit) (1.19.5)
Building wheels for collected packages: networkit
  Building wheel for networkit (setup.py) ... error
  
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2o4x2638
       cwd: /tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/
  Complete output (73 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/networkit
  copying networkit/GEXFIO.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/GraphMLIO.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/__init__.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/algebraic.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/coloring.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/csbridge.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/dynamic.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/exceptions.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/nxadapter.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/partitioning.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/plot.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/sampling.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/stopwatch.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/support.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/viztasks.py -> build/lib.linux-x86_64-3.6/networkit
  copying networkit/workflows.py -> build/lib.linux-x86_64-3.6/networkit
  creating build/lib.linux-x86_64-3.6/networkit/gephi
  copying networkit/gephi/__init__.py -> build/lib.linux-x86_64-3.6/networkit/gephi
  copying networkit/gephi/csv.py -> build/lib.linux-x86_64-3.6/networkit/gephi
  copying networkit/gephi/pyclient.py -> build/lib.linux-x86_64-3.6/networkit/gephi
  copying networkit/gephi/streaming.py -> build/lib.linux-x86_64-3.6/networkit/gephi
  creating build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/__init__.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/job.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/multiprocessing_helper.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/plot.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/profiling.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  copying networkit/profiling/stat.py -> build/lib.linux-x86_64-3.6/networkit/profiling
  creating build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_algorithms.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_centrality.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_community.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_generators.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_graph.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_graph_traversal.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_graphio.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_graphtools.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_matching_algorithms.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_randomization.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_reachability.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_scd.py -> build/lib.linux-x86_64-3.6/networkit/test
  copying networkit/test/test_sparsification.py -> build/lib.linux-x86_64-3.6/networkit/test
  creating build/lib.linux-x86_64-3.6/networkit/test/extension
  copying networkit/test/extension/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test/extension
  copying networkit/test/extension/test.py -> build/lib.linux-x86_64-3.6/networkit/test/extension
  creating build/lib.linux-x86_64-3.6/networkit/test/gephi
  copying networkit/test/gephi/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test/gephi
  creating build/lib.linux-x86_64-3.6/networkit/profiling/html
  copying networkit/profiling/html/measure.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
  copying networkit/profiling/html/overlay.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
  copying networkit/profiling/html/profile.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
  copying networkit/profiling/html/profiling.css -> build/lib.linux-x86_64-3.6/networkit/profiling/html
  copying networkit/profiling/html/profiling.js -> build/lib.linux-x86_64-3.6/networkit/profiling/html
  creating build/lib.linux-x86_64-3.6/networkit/profiling/latex
  copying networkit/profiling/latex/measure.tex -> build/lib.linux-x86_64-3.6/networkit/profiling/latex
  copying networkit/profiling/latex/profile.tex -> build/lib.linux-x86_64-3.6/networkit/profiling/latex
  creating build/lib.linux-x86_64-3.6/networkit/profiling/description
  copying networkit/profiling/description/descriptions.txt -> build/lib.linux-x86_64-3.6/networkit/profiling/description
  running build_ext
  initializing NetworKit compilation with: 'cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/build/lib.linux-x86_64-3.6 -DCMAKE_CXX_COMPILER=g++ -DNETWORKIT_FLATINSTALL=ON -DNETWORKIT_PYTHON=/usr/include/python3.6m -DNETWORKIT_PYTHON_SOABI=cpython-36m-x86_64-linux-gnu /tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5'
  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    CMake 3.6 or higher is required.  You are running version 2.8.12.2
  
  -- Configuring incomplete, errors occurred!
  cmake returned an error, exiting setup.py
  ----------------------------------------
  ERROR: Failed building wheel for networkit
  Running setup.py clean for networkit
Failed to build networkit
Installing collected packages: networkit
  
  WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /home/JohnRambo/.local/lib/python3.6/site-packages
  sysconfig: /home/JohnRambo/.local/lib64/python3.6/site-packages
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /home/JohnRambo/.local/include/python3.6m/networkit
  sysconfig: /home/JohnRambo/.local/include/python3.6/networkit
  WARNING: Additional context:
  user = True
  home = None
  root = None
  prefix = None
    Running setup.py install for networkit ... error
   
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-e0vz3nq0/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/JohnRambo/.local/include/python3.6m/networkit
         cwd: /tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/
    Complete output (72 lines):
    running install
    running build
    running build_py
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/networkit
    copying networkit/GEXFIO.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/GraphMLIO.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/__init__.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/algebraic.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/coloring.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/csbridge.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/dynamic.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/exceptions.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/nxadapter.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/partitioning.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/plot.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/sampling.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/stopwatch.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/support.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/viztasks.py -> build/lib.linux-x86_64-3.6/networkit
    copying networkit/workflows.py -> build/lib.linux-x86_64-3.6/networkit
    creating build/lib.linux-x86_64-3.6/networkit/gephi
    copying networkit/gephi/__init__.py -> build/lib.linux-x86_64-3.6/networkit/gephi
    copying networkit/gephi/csv.py -> build/lib.linux-x86_64-3.6/networkit/gephi
    copying networkit/gephi/pyclient.py -> build/lib.linux-x86_64-3.6/networkit/gephi
    copying networkit/gephi/streaming.py -> build/lib.linux-x86_64-3.6/networkit/gephi
    creating build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/__init__.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/job.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/multiprocessing_helper.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/plot.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/profiling.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    copying networkit/profiling/stat.py -> build/lib.linux-x86_64-3.6/networkit/profiling
    creating build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_algorithms.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_centrality.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_community.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_generators.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_graph.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_graph_traversal.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_graphio.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_graphtools.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_matching_algorithms.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_randomization.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_reachability.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_scd.py -> build/lib.linux-x86_64-3.6/networkit/test
    copying networkit/test/test_sparsification.py -> build/lib.linux-x86_64-3.6/networkit/test
    creating build/lib.linux-x86_64-3.6/networkit/test/extension
    copying networkit/test/extension/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test/extension
    copying networkit/test/extension/test.py -> build/lib.linux-x86_64-3.6/networkit/test/extension
    creating build/lib.linux-x86_64-3.6/networkit/test/gephi
    copying networkit/test/gephi/__init__.py -> build/lib.linux-x86_64-3.6/networkit/test/gephi
    creating build/lib.linux-x86_64-3.6/networkit/profiling/html
    copying networkit/profiling/html/measure.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
    copying networkit/profiling/html/overlay.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
    copying networkit/profiling/html/profile.html -> build/lib.linux-x86_64-3.6/networkit/profiling/html
    copying networkit/profiling/html/profiling.css -> build/lib.linux-x86_64-3.6/networkit/profiling/html
    copying networkit/profiling/html/profiling.js -> build/lib.linux-x86_64-3.6/networkit/profiling/html
    creating build/lib.linux-x86_64-3.6/networkit/profiling/latex
    copying networkit/profiling/latex/measure.tex -> build/lib.linux-x86_64-3.6/networkit/profiling/latex
    copying networkit/profiling/latex/profile.tex -> build/lib.linux-x86_64-3.6/networkit/profiling/latex
    creating build/lib.linux-x86_64-3.6/networkit/profiling/description
    copying networkit/profiling/description/descriptions.txt -> build/lib.linux-x86_64-3.6/networkit/profiling/description
    running build_ext
    initializing NetworKit compilation with: 'cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/build/lib.linux-x86_64-3.6 -DCMAKE_CXX_COMPILER=g++ -DNETWORKIT_FLATINSTALL=ON -DNETWORKIT_PYTHON=/usr/include/python3.6m -DNETWORKIT_PYTHON_SOABI=cpython-36m-x86_64-linux-gnu /tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5'
    CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
      CMake 3.6 or higher is required.  You are running version 2.8.12.2
    
    -- Configuring incomplete, errors occurred!
    cmake returned an error, exiting setup.py
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7pignmes/networkit_25d35f69cd4f447790a6d653f52e7ea5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-e0vz3nq0/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/JohnRambo/.local/include/python3.6m/networkit Check the logs for full command output.

[JohnRambo@Machine ~]$ 

Tags: pippytestbuildlinuxlibusrhtml
1条回答
网友
1楼 · 发布于 2024-06-02 08:00:15

我使用以下命令(来自here的前三个命令)解决了这个问题:

sudo yum install epel-release cmake3
sudo yum remove cmake
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
pip3.6 install networkit

相关问题 更多 >