安装slycot问题[Ubuntu 18.04]
我正在尝试在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在尝试安装 Slycot 时遇到了类似的问题,并找到了一个有效的解决方案,尽管我不完全确定它为什么能解决问题。看来 Slycot 可能有一些用 Fortran 编写的组件,这可能是以下步骤有帮助的原因:
安装 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:
Installing
gfortran
andliblapack-dev
somehow addressed the errors, possibly because Fortran seems to be used in some parts ofSlycot
build process. Theliblapack-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.
我用 conda 安装了它,它对我有用。
I installed with conda and it worked for me.