fzhu2e / cfr

A Python package for Climate Field Reconstruction
https://fzhu2e.github.io/cfr
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

name 'PyVSL' is not defined #16

Closed KINDREDFFF closed 4 months ago

KINDREDFFF commented 5 months ago

when I run the step: mdl.calibrate() it cames some problem name 'PyVSL' is not defined I try to insatll PyVSL,but it seems not work

fzhu2e commented 5 months ago

Hi, in the installation guide, it's mentioned that the below command is required in order to enable the PSMs:

pip install "cfr[psm]"

You may also just

pip install pyvsl

to install PyVSL. If you have tried this but failed, what message did you get?

KINDREDFFF commented 5 months ago

image

KINDREDFFF commented 5 months ago

as you see,I have installed the PyVSL,I can import it. I run the pip install "cfr[psm]"andpip install pyvsl but it still not works

fzhu2e commented 5 months ago

Can you check if pathos, statsmodels, and fbm have been installed as well?

KINDREDFFF commented 5 months ago

image already installed

fzhu2e commented 5 months ago

Which version of cfr are you using? In the latest version the PyVSL call should be at L1091 instead of L1073. To upgrade: pip install -U cfr.

KINDREDFFF commented 5 months ago

image

fzhu2e commented 5 months ago

OK. No essential difference then.

Can you run the below successfully?

    import statsmodels.formula.api as smf
    from pathos.multiprocessing import ProcessingPool as Pool
    import fbm
    import PyVSL
KINDREDFFF commented 5 months ago

image yes

fzhu2e commented 5 months ago

I just did a test with v2024.1.26 and it works fine.

Can you restart your Jupyter kernel and try again?

If the source code: https://github.com/fzhu2e/cfr/blob/main/cfr/psm.py#L9-L12 can be loaded without any issue, it shouldn't prompt name 'PyVSL' is not defined.

KINDREDFFF commented 5 months ago

ok,thaks.i restart it,and the error is changed image

fzhu2e commented 5 months ago

octave should be installed, see the annotation

KINDREDFFF commented 5 months ago

ok,thank you so much.I gonna update CFR and try it again.