ctlab / GADMA

Genetic Algorithm for Demographic Model Analysis
Other
46 stars 14 forks source link

running test on installation issue (yaml?) #89

Closed jdlozier closed 8 months ago

jdlozier commented 8 months ago

Hello Ive been trying to install gadma several different ways using conda or pip and am running into this issue that i can't quite figure out. In all cases I get to the point where i receive the following errors File "~/software/gadma_env/lib/python3.8/site-packages/gadma/core/core.py", line 51, in main settings_storage, args = arg_parser.get_settings()

File "~/software/gadma_env/lib/python3.8/site-packages/gadma/cli/arg_parser.py", line 73, in test_args settings_storage = SettingsStorage.from_file(TEST_SETTINGS)

several of these types of errors with the final AttributeError: "load()" has been removed, use

yaml = YAML(typ='rt') yaml.load(...)

Any suggestions?

jdlozier commented 8 months ago

Still playing around and failing. Here is more complete error code (this is an HPC linux environment, installed using the conda method, but same error with pip): --Running test case-- Traceback (most recent call last): File "/grps2/jlozier/software/miniconda3/envs/gadma/bin/gadma", line 10, in sys.exit(main()) File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/core/core.py", line 51, in main settings_storage, args = arg_parser.get_settings() File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/cli/arg_parser.py", line 123, in get_settings settings_storage = test_args() File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/cli/arg_parser.py", line 73, in test_args settings_storage = SettingsStorage.from_file(TEST_SETTINGS) File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/cli/settings_storage.py", line 1044, in from_file return obj.update_from_file(param_file, extra_param_file) File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/cli/settings_storage.py", line 998, in update_from_file loaded_dict = ruamel.yaml.load(fl, File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/ruamel/yaml/main.py", line 1085, in load error_deprecation('load', 'load', arg=_error_dep_arg, comment=_error_dep_comment) File "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/ruamel/yaml/main.py", line 1037, in error_deprecation raise AttributeError(s) AttributeError: "load()" has been removed, use

yaml = YAML(typ='rt') yaml.load(...)

and register any classes that you use, or check the tag attribute on the loaded data, instead of file "/grps2/jlozier/software/miniconda3/envs/gadma/lib/python3.8/site-packages/gadma/cli/settings_storage.py", line 998

            loaded_dict = ruamel.yaml.load(fl,
noscode commented 8 months ago

Hi @jdlozier,

Thank you very much for the feedback! I can recommend you to use specific version of ruamel.yaml==0.16.12. According to the tests, it works properly. You can install it using pip install ruamel.yaml==0.16.12.

Sorry for this dependency, I will check out the last versions of yaml library and try to fix this issue in the future.

Best regards, Ekaterina

jdlozier commented 8 months ago

Awesome! I actually ended up getting it running by randomly downgrading packages haha. But I wasn’t sure if there might be an error so I’m glad to have a specific thing to do here. One more question. Any matplotlab version recommended? I wasGetting a few plotting errors. Just go back a version?On Jan 11, 2024, at 6:43 AM, Ekaterina Noskova @.***> wrote: Hi, Thank you very much for the feedback! I can recommend you to use specific version of ruamel.yaml==0.16.12. According to the tests, it works properly. You can install it using pip install ruamel.yaml==0.16.12. Sorry for this dependency, I will check out the last versions of yaml library and try to fix this issue in the future. Best regards, Ekaterina

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

noscode commented 8 months ago

Wow, I am glad you solved it! I usually use matplotlib==3.5.3, however, some warnings still happen. By the way, you can see versions that are used for testing here.