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

ppsim no longer works on Google Colab #41

Open
EricESeverson opened this issue Feb 3, 2023 · 1 comment
Open

ppsim no longer works on Google Colab #41

EricESeverson opened this issue Feb 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@EricESeverson
Copy link
Collaborator

At some point in 2022, Google colab made some changes to their packages such that calling

pip install ppsim

in a Colab does not work. You see the following error

Building wheels for collected packages: ppsim
Building wheel for ppsim (setup.py) ... done
Created wheel for ppsim: filename=ppsim-0.1.6-cp38-cp38-linux_x86_64.whl size=739276 sha256=1dd6984598193cfb077062941f9d519d280dd1e0b7b470db6f4e4f745a6d1fde
Stored in directory: /root/.cache/pip/wheels/0f/1a/d2/c09ec1601b6fb7abc32bb0b14c23739f8e2f48539fda065137
Successfully built ppsim
Installing collected packages: numpy, jedi, ppsim
Attempting uninstall: numpy
Found existing installation: numpy 1.21.6
Uninstalling numpy-1.21.6:
Successfully uninstalled numpy-1.21.6
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cmdstanpy 1.1.0 requires numpy>=1.21, but you have numpy 1.20.1 which is incompatible.
Successfully installed jedi-0.18.2 numpy-1.20.1 ppsim-0.1.6

Then when you try to import Simulation

from ppsim import Simulation

we see the following error

/usr/local/lib/python3.8/dist-packages/ppsim/simulation.py in
39 from tqdm.auto import tqdm
40
---> 41 from . import simulator
42 from ppsim.crn import Reaction, reactions_to_dict
43 from ppsim.snapshot import Snapshot, TimeUpdate

ImportError: /usr/local/lib/python3.8/dist-packages/ppsim/simulator.cpython-38-x86_64-linux-gnu.so: undefined symbol: npy_log1pf

I don't know if this is because NumPy isn't working at all, or somehow some of the delicate stuff the cython code is trying to do importing various NumPy C functions directly (which was a thing I somehow got to work, but really never understood what it was doing) has now been broken.

@EricESeverson EricESeverson added the bug Something isn't working label Feb 3, 2023
@dave-doty
Copy link
Member

Sometimes this stuff can be fixed by freezing versions, e.g., maybe it's some interaction between Colab and the newest version of numpy, such that an older version of numpy would work?

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

No branches or pull requests

2 participants