pyopmspe11 icon indicating copy to clipboard operation
pyopmspe11 copied to clipboard

Installation problem on Ubuntu 24.04 inside conda environment

Open gassmoeller opened this issue 1 year ago • 4 comments

I am following this description of how to install pyopmspe11 and ran into an issue. Before doing the pip install I successfully installed the binary distribution of flow for Ubuntu 24.04 following this page. The installation of pyopmspe11 fails with the following message:

(pyopmspe11) rene@nb-00143:~$ pip install git+https://github.com/OPM/pyopmspe11.git
Collecting git+https://github.com/OPM/pyopmspe11.git
  Cloning https://github.com/OPM/pyopmspe11.git to /tmp/pip-req-build-e00p7lxw
  Running command git clone --filter=blob:none --quiet https://github.com/OPM/pyopmspe11.git /tmp/pip-req-build-e00p7lxw
  Resolved https://github.com/OPM/pyopmspe11.git to commit 17233487c19ced039476e5da427a4b93b72aaf8a
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting mako (from pyopmspe11==2024.4)
  Downloading Mako-1.3.6-py3-none-any.whl.metadata (2.9 kB)
Collecting matplotlib (from pyopmspe11==2024.4)
  Downloading matplotlib-3.9.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting pandas (from pyopmspe11==2024.4)
  Downloading pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
Collecting Pyarrow (from pyopmspe11==2024.4)
  Downloading pyarrow-18.0.0-cp313-cp313-manylinux_2_28_x86_64.whl.metadata (3.3 kB)
INFO: pip is looking at multiple versions of pyopmspe11 to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement resdata (from pyopmspe11) (from versions: none)
ERROR: No matching distribution found for resdata

I installed this in a conda environment. If I instead follow the instruction for a source install (second code box here) and install it in a virtual python environment the installation succeeds. Maybe there is a weird interaction why pip inside my conda environment doesnt find the correct version of resdata? Any advice would be appreciated, but also if conda is not supported it should probably be mentioned on the installation page.

Details of my environment:

OS: Ubuntu 24.04 Python: A clean conda environment with Python 3.13.0 conda list:

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
ca-certificates           2024.8.30            hbcca054_0    conda-forge
ld_impl_linux-64          2.43                 h712a8e2_2    conda-forge
libexpat                  2.6.4                h5888daf_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.2.0               h77fa898_1    conda-forge
libgcc-ng                 14.2.0               h69a702a_1    conda-forge
libgomp                   14.2.0               h77fa898_1    conda-forge
libmpdec                  4.0.0                h4bc722e_0    conda-forge
libsqlite                 3.47.0               hadc24fc_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.3.1                hb9d3cd8_2    conda-forge
ncurses                   6.5                  he02047a_1    conda-forge
openssl                   3.4.0                hb9d3cd8_0    conda-forge
pip                       24.3.1             pyh145f28c_0    conda-forge
python                    3.13.0          h9ebbce0_100_cp313    conda-forge
python_abi                3.13                    5_cp313    conda-forge
readline                  8.2                  h8228510_1    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tzdata                    2024b                hc8b5060_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

apt list libopm*:

libopm-common-bin/noble,now 2024.10-1~noble amd64 [installed,automatic]
libopm-common-dev/noble 2024.10-1~noble amd64
libopm-common-doc/noble,noble 2024.10-1~noble all
libopm-common/noble,now 2024.10-1~noble amd64 [installed,automatic]
libopm-grid-bin/noble,now 2024.10-1~noble amd64 [installed,automatic]
libopm-grid-dev/noble 2024.10-1~noble amd64
libopm-grid-doc/noble,noble 2024.10-1~noble all
libopm-grid/noble,now 2024.10-1~noble amd64 [installed,automatic]
libopm-material-dev/noble,noble 2024.10-1~noble all
libopm-material-doc/noble,noble 2024.10-1~noble all
libopm-models-dev/noble 2024.04-1~noble amd64
libopm-models-doc/noble,noble 2024.04-1~noble all
libopm-simulators-bin/noble,now 2024.10-1~noble amd64 [installed]
libopm-simulators-dev/noble 2024.10-1~noble amd64
libopm-simulators-doc/noble,noble 2024.10-1~noble all
libopm-simulators/noble,now 2024.10-1~noble amd64 [installed,automatic]
libopm-upscaling-bin/noble 2024.10-1~noble amd64
libopm-upscaling-dev/noble 2024.10-1~noble amd64
libopm-upscaling-doc/noble,noble 2024.10-1~noble all
libopm-upscaling/noble 2024.10-1~noble amd64

gassmoeller avatar Nov 14 '24 12:11 gassmoeller

Related to https://github.com/openjournals/joss-reviews/issues/7357

gassmoeller avatar Nov 14 '24 13:11 gassmoeller

Does it work with python <3.13? This python version is quite new and might be related to your problem here. When you installed it in a python virtual environment, was it for the same python version?

MatthewFlamm avatar Nov 15 '24 19:11 MatthewFlamm

Thanks @gassmoeller for raising this. This seems to be due to Python3.13 as @MatthewFlamm has commented, thanks. Now in the top of the installation of the documentation this has been added in https://github.com/OPM/pyopmspe11/pull/99:

Installation The following steps work installing the dependencies in Linux via apt-get or in macOS using brew or macports. While using packages managers such as Anaconda, Miniforge, or Mamba might work, these are not tested. In addition, the current supported Python versions for macOS are 3.10 to 3.12 and for Linux 3.8 to 3.12. We will update the documentation when Python3.13 is supported (e.g., the resdata Python package is not yet available via pip install in Python 3.13).

https://opm.github.io/pyopmspe11/installation.html

daavid00 avatar Dec 04 '24 18:12 daavid00

Thanks for documenting the issue. This solves the problem as far as https://github.com/openjournals/joss-reviews/issues/7357 is concerned, but I will leave this issue open so that you (and your users) can find it until python 3.13 is supported.

gassmoeller avatar Dec 20 '24 09:12 gassmoeller