openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

Misleading warning about PyYAML #1153

Open Tumulte opened 1 year ago

Tumulte commented 1 year ago

When I run openfisca I got this warning (from parameters/config.py):

libyaml is not installed in your environment. This can make OpenFisca slower to start. Once you have installed libyaml run 'pip uninstall pyyaml && pip install pyyaml --no-cache-dir' so that it is used in your Python environment.

However I do have libyaml and pyyaml installed, the problem comes from CLoader : I can import yaml, but from yaml import CLoader doesn't work (the try tests this import : from yaml import CLoader as Loader)

I suggest to change the warning to

libyaml is not installed in your environment, or your version of libyaml doesn't include CLoader

Context

I identify more as a:

Thanks,

best