Closed DongweiYe closed 1 year ago
Ah, yes. This is an issue with pip
, which should figure out that it should upgrade muscle3
, ymmsl
, yatiml
and ruamel.yaml
all together. There is a valid combination of versions, it just can't find it. ruamel.yaml
<=0.15.64 is what MUSCLE3 required previously, and now it's >=0.15.71, and it just doesn't understand that it has to upgrade ruamel.yaml as well.
The short answer is: 0.15.64 will actually work fine despite this message. If you want to upgrade your ruamel.yaml to something more recent but still compatible with MUSCLE3, use
pip install 'ruamel.yaml<=0.16.10,>=0.15.71'
The background here is that ruamel.yaml doesn't have a stable API, and some incompatible changes were made in 0.15.65 that broke MUSCLE3. So I fixed the version to 0.15.64 or lower, to make sure things would continue to work. Shortly after that, lots of work was done on ruamel.yaml, and many releases were made, so that 0.15.64 was getting a bit old. Fixing a dependency to an old version is bad for compatibility (you may want to use some other Python library together with MUSCLE3 which requires a more recent ruamel.yaml) so I went and fixed MUSCLE3 (or rather YAtiML) to be able to use newer versions of ruamel.yaml as well. Then I did a whole lot of automated testing against different versions of ruamel.yaml to make sure that things actually worked. Everything was fine for 0.15.64 up to 0.16.10, except for 0.15.70, which had a bug in it. So I just set the lower bound to 0.15.71 (where the bug was fixed). And then pip isn't smart enough to deal with needing to update...
Pip has now started warning that its algorithm for resolving dependencies will change in October. I've just seen it install 0.16.12 with the old algorithm (which is not in the list of allowed dependencies), but when I enabled the new algorithm and installed again, it automatically downgraded the dependency to 0.16.10. This needs more testing to make sure that it actually works better in all circumstances, but there's some hope :-).
Did some more testing today, and confirmed that the following command will upgrade the muscle3 package from 0.2.0 to 0.3.1 correctly:
pip install --upgrade --use-feature=2020-resolver muscle3
at least with pip 20.2.3.
I can try to do something still with the version declaration, but it's a bit tricky because it would require new releases of YAtiML, yMMSL and then MUSCLE3, which is unlikely to happen before the 2020 resolver becomes the default in October. Of course, there may be still people using older versions of Pip that encounter the problem, but since the error message is actually harmless and the original case will be fixed where it is supposed to be fixed, I think that maybe it's best to leave this one be.
I installed muscle3 python version 0.2.0 before and when the new version 0.3.1 came out, I used 'pip install muscle3==0.3.1' to update the muscle3 package. However, I met an error says:
Error: yatiml 0.5.1 has requirement ruamel.yaml<=0.16.10,>=0.15.71, but you'll have ruamel-yaml 0.15.64 which is incompatible.