krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
377 stars 96 forks source link

The Google Collab example has dependency issues and will not run #160

Closed slamjammin closed 1 year ago

slamjammin commented 1 year ago

Does anyone know how to resolve this? Thanks!

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-8-9643fa4774a5>](https://localhost:8080/#) in <module>
      1 #load some data from Klamp't
----> 2 from klampt import *
      3 w = WorldModel()
      4 w.loadFile('Klampt-examples/data/athlete_fractal_1.xml')

1 frames
[/usr/local/lib/python3.8/dist-packages/klampt/__init__.py](https://localhost:8080/#) in <module>
      7 
      8 from .version import __version__
----> 9 from .robotsim import *
     10 import atexit
     11 atexit.register(destroy)

[/usr/local/lib/python3.8/dist-packages/klampt/robotsim.py](https://localhost:8080/#) in <module>
     16 # Import the low-level C/C++ module
     17 if __package__ or "." in __name__:
---> 18     from . import _robotsim
     19 else:
     20     import _robotsim

ImportError: numpy.core.multiarray failed to import

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
krishauser commented 1 year ago

Ah, Klampt needs a newer version of numpy. If the first "!pip install numpy" call is changed to "!pip install -U numpy" this will work.