Giter VIP home page Giter VIP logo

Comments (6)

RBdC avatar RBdC commented on July 28, 2024

Dear AS,

thanks for the message and the interest in our software package SIPPY.

We have encountered different times problem with the installation of slycot (as evidenced in the user guide https://github.com/CPCLAB-UNIPI/SIPPY/blob/master/user_guide.pdf).
Another way useful for installing slycot in mac is running the wheel following the instructions described in https://pypi.org/project/slycot/#description section "From source without conda (Linux, macOS, Windows)".

In addition, about issues induced by slycot affecting the identification methods implemented in SIPPY,
as written in the user guide, we know that:
For ’N4SID’, ’MOESP’ and ’CVA’ methods, if the message "Kalman filter cannot be calculated" is shown, the problem can be actually due to the fact that the Slycot package is not well installed, since the internal function control.dare is not able to solve the Discrete Algebraic Riccati Equation (DARE).
To check if Slycot works properly, use the state space example (Ex_SS.py, attached in Identification_code.zip), where the K should be calculated.
Other subspace methods (parsimoniouos PARSIM-S,-K,-P) and also input-output models (as ARMAX) do not use the function DARE, so do not need slycot to be correctly installed, and no problems in the identification results should arise.

SIPPY team

from sippy.

andre-shahinian avatar andre-shahinian commented on July 28, 2024

SIPPY Team,

I tried installing Slycot using the recommended section and got the following error:

Traceback (most recent call last):
File "setup.py", line 25, in
from skbuild import setup
ModuleNotFoundError: No module named 'skbuild'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 28, in
raise ImportError('scikit-build must be installed before running setup.py')
ImportError: scikit-build must be installed before running setup.py

However, when I run pip3 install scikit-build, I get the following output:

Requirement already satisfied: scikit-build in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (0.11.1)
Requirement already satisfied: setuptools>=28.0.0 in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (from scikit-build) (57.4.0)
Requirement already satisfied: packaging in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (from scikit-build) (21.0)
Requirement already satisfied: distro in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (from scikit-build) (1.5.0)
Requirement already satisfied: wheel>=0.29.0 in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (from scikit-build) (0.36.2)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\ashahinian\appdata\local\programs\python\python39\lib\site-packages (from packaging->scikit-build) (2.4.7)

I'm not entirely sure why setup.py cannot find this and run; however, I think I already have Slycot installed. I added import Slycot to Ex_SS.py and ran the code, getting the same output as before I added the line without an error. The Kalman gains still could not be calculated, but I would imagine if slycot were not installed, I could not import it.

Thoughts?
-AS

from sippy.

CPCLAB-UNIPI avatar CPCLAB-UNIPI commented on July 28, 2024

Dear Andre,
can you please tell us the version of the slycot and control that you have installed? Maybe there is a problem of inconsistency there.

About the scikit-build installation, have you got other python environments installed in your pc? It seems that when running python setup.py install setup.py is not findining scikit-build in the environment to which the command python is linked.

SIPPY team

from sippy.

andre-shahinian avatar andre-shahinian commented on July 28, 2024

SIPPY Team,

slycot version: 0.4.0
control version: 0.9.0

I had two python environments installed on my pc. One was from pip and the other was from Anaconda. I installed the second one in an attempt to get slycot installed, but have now deleted it to try to install it without conda. This time, the output to the command 'python setup.py install' was:

FC ('-DCMAKE_Fortran_COMPILER=', 'C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Library/bin/flang.exe')
F2PY ('-DF2PY_EXECUTABLE=', 'C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Scripts/f2py.exe')
NUMPY_INCLUDE ('-DNumPy_INCLUDE_DIR=', 'C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Include')
['-DSLYCOT_VERSION:STRING=0.4.0', '-DGIT_REVISION:STRING=ac0944b363a6cfcc0c3d5128cdd484d74173aa3b', '-DISRELEASE:STRING=True', '-DFULL_VERSION=0.4.0.gitac0944b', '-GNMake Makefiles', '-DCMAKE_Fortran_COMPILER=C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Library/bin/flang.exe', '-DF2PY_EXECUTABLE=C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Scripts/f2py.exe', '-DNumPy_INCLUDE_DIR=C:/Users/ashahinian/AppData/Local/Programs/Python/Python39/Include', '-DCMAKE_Fortran_SIMULATE_VERSION=5.0.0', '-DCMAKE_Fortran_COMPILER_ID=Flang', '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']


--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument  value or use a ... suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Error at CMakeLists.txt:2 (PROJECT):
  Running

   'nmake' '-?'

  failed with:

   The system cannot find the file specified


-- Configuring incomplete, errors occurred!
See also "C:/Users/ashahinian/Downloads/slycot-0.4.0.0.tar/dist/slycot-0.4.0.0/slycot-0.4.0.0/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------

********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.

Building windows wheels for Python 3.9 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":

  https://visualstudio.microsoft.com/vs/

********************************************************************************

Luckily, it was able to find the Fortran compiler (which is a step in the right direction); however, it looks like the issue is with CMake. I don't know why it was able to find the first file and not the second.

Best,
AS

from sippy.

CPCLAB-UNIPI avatar CPCLAB-UNIPI commented on July 28, 2024

Dear Andre,
with
slycot version: 0.4.0
control version: 0.9.0

EX_SS.py runs smoothly and without errors and it is able to perform identification with all the six methods in the example file.

For the problems with slycot installation, did you succeeded to run it in the same python environment where you installed SIPPY?
Please note that if you have more problems when installing slycot refers to this issue or to these repos for more information.

Best regards,

SIPPY team

from sippy.

erik1392 avatar erik1392 commented on July 28, 2024

Hello, as I spent almost the whole day debugging the installation of SIPPY in virtual env with pip. I finished with the following error while installing slycot :

  /tmp/pip-build-env-gae35oye/overlay/lib/python3.10/site-packages/numpy/f2py/src/fortranobject.h:7:10: fatal error: Python.h: No such file or directory
      7 | #include <Python.h>
        |          ^~~~~~~~~~

I discovered that besides listed dependencies for slycot it also requires python-dev for the version of python you are using. For me apt install python3.10-dev did the trick.

from sippy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.