dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.42k stars 310 forks source link

zsh:1: no matches found: pysindy[cvxpy] #369

Closed penguinaugustus closed 1 year ago

penguinaugustus commented 1 year ago

Hi, yesterday i submitted an issue on module 'pysindy' has no attribute 'SINDyPI' and got reply: https://github.com/dynamicslab/pysindy/issues/366 However, i still met some problem: first I tried pip install pysindy[cvxpy] i got

zsh:1: no matches found: pysindy[cvxpy]
Note: you may need to restart the kernel to use updated packages.

I restart the kernel but still AttributeError: module 'pysindy' has no attribute 'SINDyPI' Then i try to upgrade my pip with pip install --upgrade pip setuptools and try pip install pysindy[cvxpy] again, but get the same result. Then i try pip install "pysindy[cvxpy]", the result was:

Requirement already satisfied: pysindy[cvxpy] in /Users/yufu/opt/anaconda3/lib/python3.9/site-packages (1.7.5)
WARNING: pysindy 1.7.5 does not provide the extra 'cvxpy'
Requirement already satisfied: scikit-learn>=0.23 in /Users/yufu/opt/anaconda3/lib/python3.9/site-packages (from pysindy[cvxpy]) (1.0.2)
Requirement already satisfied: numpy in /Users/yufu/opt/anaconda3/lib/python3.9/site-packages (from pysindy[cvxpy]) (1.21.5)
.......
Note: you may need to restart the kernel to use updated packages.

could you give me some instruction on it? thank you so much on your help!

Jacob-Stevens-Haas commented 1 year ago

Sorry, I see that 1.7.5 didn't include the cvxpy extra. Manually install the following packages should clear the error:

pip install cvxpy scs>=2.1,!=2.1.4

Let me know if it works!

penguinaugustus commented 1 year ago

Thank you so much for your help! First i tried pip install cvxpy scs>=2.1,!=2.1.4. i was returned with

zsh:1: 2.1,!=2.1.4 not found
Note: you may need to restart the kernel to use updated packages.

then i tried pip install 'cvxpy' 'scs>=2.1' 'scs!=2.1.4'. it worked!

Jacob-Stevens-Haas commented 1 year ago

yes, sorry, different shells can be finnicky with whitespace and different characters.