jdber1 / opendrop

OpenDrop pendant drop tensiometry software
GNU General Public License v3.0
30 stars 18 forks source link

Installing new version on Ubuntu 20.04 #32

Closed ricotabor closed 3 years ago

ricotabor commented 3 years ago

Getting the following error when trying to install newest version on Ubuntu 20.04:

Screenshot from 2021-03-18 16-22-06

Also getting a weird error when trying to save in previous version (appears when you type any characters into the file name box):

Screenshot from 2021-03-18 16-20-51

All and any help very much appreciated!

eugenhu commented 3 years ago

I believe the bug with the previous version has been fixed in the new version.

There's some new build dependencies in the new version that I haven't tested with installing on Ubuntu yet, the only difference should be running

sudo apt install libboost-math-dev libsundials-dev

first before pip installing opendrop. Let me know if that doesn't work.

ricotabor commented 3 years ago

Can confirm that error is after successfully installing libboost-math-dev and libsundials-dev

eugenhu commented 3 years ago

Hmm okay, that's strange I'll try installing on Ubuntu when I have the time to see what exactly the problem is.

eugenhu commented 3 years ago

Looks like the SUNDIALS package on the Ubuntu 20.04 repositories are older than what we need (way back from 2018). Not sure if there's a way to use apt to install a newer version or if it has to be done manually from source. I'll update the documentation when I find a working solution.

eugenhu commented 3 years ago

Sorry about the late response, I've updated the installation docs.

Mainly added instructions to install SUNDIALS from source, and also libboost-math-dev should have been libboost-dev.

I've tested this on Ubuntu 18.04, let me know if you run into any issues.


Just as an aside, running

pip3 install git+https://github.com/jdber1/opendrop.git

each time an install fails will require re-cloning the repository which can take a while, it's also possible to just clone the repo and cd into the source directory and run

pip3 install .

If the installation succeeds, cd out of the source directory and you can then run python3 -m opendrop (otherwise it will try running the opendrop package in the source directory with unbuilt dependencies).

ricotabor commented 3 years ago

Thanks for the updated instructions! I got as far as installing OpenDrop (n.b on vanilla Ubuntu 20.04 I also needed to build a newer version of cmake from source). Installing OD now fails for me at "Preparing wheel metadata" step with the following error:

Screenshot from 2021-03-24 08-58-36

ricotabor commented 3 years ago

Ahhhh that's the issue with Boost not being new enough. Fixed, but messy:

sudo apt remove 'libboost.*-dev' sudo add-apt-repository ppa:mhier/libboost-latest sudo apt-get update sudo apt-get install libboost1.73-dev

Did the trick for me.

ricotabor commented 3 years ago

With that apparently successful installation of everything, trying to run OD gives me:

Screenshot from 2021-03-24 09-25-11

eugenhu commented 3 years ago

Could you try apt purge libsundials-dev and then running opendrop again? And then if running opendrop again doesn't work try reinstalling. I'm thinking it might be linking to the older sundials libraries.

ricotabor commented 3 years ago

Amazing, thank you for the lightning fast response! Can confirm that:

sudo apt purge libsundials-dev pip3 uninstall opendrop pip3 install git+https://github.com/jdber1/opendrop.git

worked a treat! Goodness me the new version is quick. Also confirmed saving now working perfectly, and I love not having to put in gravity every time.

Thank you!

eugenhu commented 3 years ago

No problems, thanks for working through the install issues.

I think ctrl+c in the terminal still doesn't kill the application on Ubuntu for some reason, I'll need to look into that in the future. And eventually set up some continuous deployment to auto-build opendrop so the user doesn't have to mess around with dependencies.

ricotabor commented 3 years ago

Thanks for the rapid responses and assistance, as always! Package management on Ubuntu is conservative (for stability I guess) but building from source is indeed fiddly, so anything that can avoid too much hassle will help users greatly. Still, most people using Ubuntu are fairly competent anyway... I'm the exception! :)