安装slycot问题[Ubuntu 18.04]

发布于 2025-01-10 08:04:37 字数 5324 浏览 0 评论 0原文

我正在尝试在 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

如果有人可以帮助我,我将非常感激,因为我在安装过程中浪费了很多时间,并且需要访问实际使用它。

提前致谢。

I'm trying to install the python slycot package on ubuntu 18.04. But, I can't quite find the way to do it. I keep getting the following error:

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

Here are some of the programs that i'm using:

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

And its location:

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

I would really appreciate if someone could help me because i'm wasting a lot of time with this install and i need to get to actually use it.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那些过往 2025-01-17 08:04:37

我在尝试安装 Slycot 时遇到了类似的问题,并找到了一个有效的解决方案,尽管我不完全确定它为什么能解决问题。看来 Slycot 可能有一些用 Fortran 编写的组件,这可能是以下步骤有帮助的原因:

sudo apt-get install gfortran liblapack-dev

安装 gfortran 和 liblapack-dev 以某种方式解决了错误,可能是因为 Fortran 似乎用于 Slycot 构建过程的某些部分。 liblapack-dev 提供了 LAPACK 库,Slycot 中的某些数值运算可能需要这些库。

GitHub 上有关 Slycot 问题的讨论中提到了此方法,您可以查看更多见解:Slycot GitHub 问题#15

I encountered a similar issue while trying to install Slycot and found a solution that worked, though I'm not entirely sure why it solves the problem. It seems that Slycot might have some components written in Fortran, which could be why the following steps helped:

sudo apt-get install gfortran liblapack-dev

Installing gfortran and liblapack-dev somehow addressed the errors, possibly because Fortran seems to be used in some parts of Slycot build process. The liblapack-dev provides LAPACK libraries, which are likely needed for some numerical operations within Slycot.

This method was mentioned in the discussion about Slycot issues on GitHub, which you can check out for more insights: Slycot GitHub Issue #15.

巴黎夜雨 2025-01-17 08:04:37

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

conda install -c conda-forge slycot

I installed with conda and it worked for me.

conda install -c conda-forge slycot
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文