google-deepmind / acme

A library of reinforcement learning components and agents
Apache License 2.0
3.52k stars 426 forks source link

Quickstart notebook not working in Colab #280

Open callumtilbury opened 1 year ago

callumtilbury commented 1 year ago

When trying to run the examples/quickstart.ipynb notebook, Colab crashes at the cell with the import statements:

Firstly an error relating to numpy:

RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe

And then an error which crashes the session:

ImportError                               Traceback (most recent call last)
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:
SystemError                               Traceback (most recent call last)
SystemError: <built-in function __import__> returned a result with an error set

Regarding the first error: I witnessed this problem elsewhere, and I believe it's a Colab bug. As in interim hack for that issue, I found that simply calling %pip install numpy fixes it. I am not sure if the same can be done here.

As for the second error: I haven't looked into a cause nor solution.