forlilab / Meeko

Interfacing RDKit and AutoDock
GNU Lesser General Public License v2.1
188 stars 46 forks source link

Python Packaging Issues #139

Open xavierholt opened 1 month ago

xavierholt commented 1 month ago

I'm trying to install Meeko in a Python 3.12 virtual environment on a clean Ubuntu 24.04 system. I've run into a couple problems, all related to package dependencies:

I was able to get things working by cloning the repo, editing setup.py and installing from source, but it would be nice if things were easier via pip. I think the following would take care of it:

It looks like the Python version restriction was added in https://github.com/forlilab/Meeko/commit/03d4168a72cb0d52043852ae388f025e5461e84c to work around ProDy restrictions, so I have no idea how feasible removing it would be... Alternatively, you could pin RDKit to version 2023.9.6 (or earlier), which was the last to include the rdkit.six submodule.

diogomart commented 1 month ago

Thank you for your comment. We have a tough decision to make for meeko v0.6. Our current plan is to require prody (to parse mmcif mostly). But prody doesn't work on 3.12. Removing the <3.12 restriction worked for v0.5 because prody is optional in meeko v0.5 (it's used only for tethered docking). For meeko v0.6 we have to choose between 3.12 or prody, can't have both unfortunately.

diogomart commented 1 month ago

Could Python 3.11 work for you?

xavierholt commented 1 month ago

It looks like Python 3.12 is the only officially supported Python version on Ubuntu 24.04. You can install other versions via unofficial APT repos (a quick Google turned up deadsnakes), but in my case I'm running on AWS, so it's easier to switch to an Ubuntu 22.04 machine than to deal with non-standard packages. This'll be more of a problem for people running on local machines.

Anyway, it sounds like the underlying problem is ProDy, not Meeko. I don't see any tickets regarding Python 3.12 on their GitHub page, so I'll open one and ask.

diogomart commented 1 month ago

Micromamba has been working well for me, where "working well" is in light of the complexity of python dependency networks. For example, this should work out of the box and result in a python 3.11 installation:

micromamba create -n myenv
micromamba activate  myenv
micromamba install meeko
xavierholt commented 1 month ago

Thanks! Using micromamba seems to be easy enough for now. I'm a little nervous 'cause it installed Python 3.11 without me specifying that anywhere, but I can confirm it works on Ubuntu 24.04.

In the meantime, I opened https://github.com/prody/ProDy/issues/1915 asking about Python 3.12 support for ProDy.

diogomart commented 1 month ago

It installed 3.11 because meeko's conda recipe restricts to <3.12. You can have multiple environments with different python versions, or package versions, and pin the python version with micromamba install python=3.12. You can also pip install inside these environments. There's a good chance things will get messed up, eventually, but navigating Python dependencies is nicer with micromamba than without it.