安装slycot问题[Ubuntu 18.04]

问题描述 投票:0回答:2

我正在尝试在 ubuntu 18.04 上安装 python slycot 包。但是,我不太找到方法。我不断收到以下错误:

alemoreno@alejandro:~$ pip3 install slycot
Defaulting to user installation because normal site-packages is not writeable
Collecting slycot
  Using cached slycot-0.4.0.0.tar.gz (1.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /usr/local/lib/python3.9/dist-packages (from slycot) (1.22.1)
Building wheels for collected packages: slycot
  Building wheel for slycot (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for slycot (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [95 lines of output]
      Not searching for unused variables given on the command line.
      CMake Error at CMakeLists.txt:2 (PROJECT):
        Running
      
         '/home/alemoreno/.local/bin/ninja' '--version'
      
        failed with:
      
         Traceback (most recent call last):
          File "/home/alemoreno/.local/bin/ninja", line 5, in <module>
            from ninja import ninja
      
        ModuleNotFoundError: No module named 'ninja'
      
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-g8wahozy/slycot_49cb919281814f419e836df3bc561dfd/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
      Not searching for unused variables given on the command line.
      -- The C compiler identification is GNU 7.5.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The Fortran compiler identification is unknown
      CMake Error at CMakeLists.txt:4 (ENABLE_LANGUAGE):
        No CMAKE_Fortran_COMPILER could be found.
      
        Tell CMake where to find the compiler by setting either the environment
        variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
        path to the compiler, or to the compiler name if it is in the PATH.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-g8wahozy/slycot_49cb919281814f419e836df3bc561dfd/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
      See also "/tmp/pip-install-g8wahozy/slycot_49cb919281814f419e836df3bc561dfd/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
      
      
      --------------------------------------------------------------------------------
      -- Trying "Ninja" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Ninja" generator - failure
      --------------------------------------------------------------------------------
      
      
      
      --------------------------------------------------------------------------------
      -- Trying "Unix Makefiles" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Unix Makefiles" generator - failure
      --------------------------------------------------------------------------------
      
      ********************************************************************************
      scikit-build could not get a working generator for your system. Aborting build.
      
      Building Linux wheels for Python 3.9 requires a compiler (e.g gcc).
      But scikit-build does *NOT* know how to install it on ubuntu
      
      To build compliant wheels, consider using the manylinux system described in PEP-513.
      Get it with "dockcross/manylinux-x64" docker image:
      
        https://github.com/dockcross/dockcross#readme
      
      For more details, please refer to scikit-build documentation:
      
        http://scikit-build.readthedocs.io/en/latest/generators.html#linux
      
      ********************************************************************************
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for slycot
Failed to build slycot
ERROR: Could not build wheels for slycot, which is required to install pyproject.toml-based projects

以下是我正在使用的一些程序:

alemoreno@alejandro:~$ pip3 --version
pip 22.0.3 from /home/alemoreno/.local/lib/python3.9/site-packages/pip (python 3.9)
alemoreno@alejandro:~$ ninja --version
1.10.2.git.kitware.jobserver-1

及其位置:

alemoreno@alejandro:~$ whereis ninja
ninja: /usr/bin/ninja /home/alemoreno/.local/bin/ninja /usr/share/man/man1/ninja.1.gz

如果有人可以帮助我,我真的很感激,因为我在这个安装上浪费了很多时间,而且我需要实际使用它。

提前致谢。

python installation controls ubuntu-18.04
2个回答
0
投票

我安装了 conda,它对我有用。

conda install -c conda-forge slycot

0
投票
sudo apt-get install gfortran liblapack-dev

这对我有用

© www.soinside.com 2019 - 2024. All rights reserved.