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

ArviZ fails to load when scipy.fft is imported #188

Closed
sethaxen opened this issue Jun 3, 2022 · 3 comments · Fixed by #189
Closed

ArviZ fails to load when scipy.fft is imported #188

sethaxen opened this issue Jun 3, 2022 · 3 comments · Fixed by #189
Labels
bug Something isn't working

Comments

@sethaxen
Copy link
Member

sethaxen commented Jun 3, 2022

Our daily CI runs started spontaneously failing 14 days ago, i.e. going from https://github.com/arviz-devs/ArviZ.jl/runs/6517258108, which passes to https://github.com/arviz-devs/ArviZ.jl/runs/6533529487, which fails. It fails upon precompilation of the package and emits the error message:

The Python package arviz could not be imported by pyimport. Usually this means
that you did not install arviz in the Python version being used by PyCall.

No commits were made to ArviZ between these runs. Both runs use the same operating system version, same Julia and Python versions, and same PyCall and Conda versions. There were no new releases to Python ArviZ in that time period.

@sethaxen
Copy link
Member Author

sethaxen commented Jun 4, 2022

Found it! Seems to be an issue with loading the latest release of scipy in Julia's conda installation. See JuliaPy/PyCall.jl#990

We could temporarily work around this by manually installing scipy v1.8.0 in our conda environment.

@sethaxen sethaxen changed the title CI failing mysteriously CI failing when scipy.fft is imported Jun 4, 2022
@sethaxen sethaxen reopened this Jun 19, 2022
@sethaxen sethaxen changed the title CI failing when scipy.fft is imported ArviZ fails to load when scipy.fft is imported Jun 19, 2022
@sethaxen
Copy link
Member Author

Reopening so users can find this issue.

There are 2 workarounds. First, you can launch Julia like this

$ LD_PRELOAD=$HOME/.julia/conda/3/lib/libstdc++.so julia

To avoid having to do this every time, you can add the following to your .bashrc file:

export LD_PRELOAD=$HOME/.julia/conda/3/lib/libstdc++.so

Second, since the issue is with conda's scipy version, you can pip install scipy instead:

$ ~/.julia/conda/3/bin/python -m pip install --force-reinstall --no-deps scipy

@sethaxen
Copy link
Member Author

Fixed by #290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant