Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failing related to pymc: workaround #30

Open
lukewestern opened this issue Jan 19, 2024 · 3 comments
Open

Installation failing related to pymc: workaround #30

lukewestern opened this issue Jan 19, 2024 · 3 comments

Comments

@lukewestern
Copy link
Collaborator

When running pip install -e openghg_inversions I ran into an installation issue related to pymc.

My workaround was to install pymc when creating the new environment (note I used conda rather than a virtual environment here), and ensuring that numpy was version 1.25.2 (the latest numpy version causes conflicts, this happens at runtime):
conda create -c conda-forge -n openghg_inv "pymc>5" "numpy=1.25.2"
pip install --upgrade pip setuptools wheel
pip install -e openghg_inversions

@brendan-m-murphy
Copy link
Contributor

brendan-m-murphy commented Jan 24, 2024

This was an issue for about a month, but you should be able to use numpy 1.26 with the latest version of pytensor and pymc: pymc-devs/pytensor#441 (comment). Maybe check to make sure you have the latest version of pytensor? (Although I don't see why you wouldn't get it from pymc...)

For reference, these are some of the packages in a python venv I created recently:

Package Version

jax 0.4.21
jaxlib 0.4.21
numpy 1.26.2
numpyro 0.13.2
openghg 0.6.2+204.ged8115f8
openghg-defs 0.0.2
openghg-inversions 0.0.2
opt-einsum 3.3.0
packaging 23.2
pandas 1.5.3
pymc 5.10.1
pytensor 2.18.3
scipy 1.11.4
setuptools 69.0.2
wheel 0.42.0
xarray 2023.12.0
xarray-einstats 0.6.0

One possible difference from what you did was that I did:

pip install -U pip wheel setuptools
python -m pip install numpy

before installing other requirements, because it seems like pip install numpy doesn't link the openblas libraries shipped with numpy for some reason. (The other way around this is to use conda to install numpy, as you did.)

Also, I don't know what the pytensor fix was, so maybe they just avoided the meson build of numpy, which was what caused numpy 1.26 to fail with older versions of pytensor (although I'm not sure if there is an alternative to the meson build for numpy 1.26).

@joe-pitt
Copy link
Contributor

Not sure if this is related, but I also got an error related to pymc when running pip install -e openghg_inversions

AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

It was resolved by rolling back from python 3.12 to python 3.11 (as described here: https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean)

@brendan-m-murphy
Copy link
Contributor

I don't think openghg supports python 3.12 yet (I could be wrong). I suppose this should be in the install instructions, if that's the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants