dusty-nv/jetson-reinforcement

python gym-DQN.py => RuntimeError: torch was compiled without numpy support

TheRobotStudio opened this issue · 3 comments

Hello,
After successfully build, with a fresh install of a Jetpack 3.0 on a TX2, when I try to run gym-DQN.py, I got this error:

$ python gym-DQN.py 
[2017-07-21 14:08:36,674] Making new env: CartPole-v0
Traceback (most recent call last):
  File "gym-DQN.py", line 280, in <module>
    plt.imshow(get_screen().cpu().squeeze(0).permute(1, 2, 0).numpy(),
  File "gym-DQN.py", line 274, in get_screen
    screen = torch.from_numpy(screen)
RuntimeError: torch was compiled without numpy support
/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3.py:215: Warning: Source ID 8 was not found when attempting to remove it
  GLib.source_remove(self._idle_draw_id)

Also I had to install matplotlib for python:
$ sudo pip install --upgrade matplotlib
But it seems there is a problem with numpy.
Any idea on how to solve this issue ? Is there a list of pyhton modules that must be installed before the build ?
Thanks!

Thanks Dustin,
After doing that, I got the error message:
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
I could solve this installing this, in case some people has this issue link:
sudo apt-get install python-gi-cairo
And now the demo is working!