python gym-DQN.py => RuntimeError: torch was compiled without numpy support
TheRobotStudio opened this issue · 3 comments
TheRobotStudio commented
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!
dusty-nv commented
Hi, sorry for the problem, perhaps the pre-install command to install numpy is missing (only used in the standalone examples). I guess my system already had it from before.
Can you try installing it like this?
sudo pip install numpy
Then rm build and make a new build.
Hope that helps,
Dustin
On Jul 21, 2017 8:20 AM, Cyril <notifications@github.com> wrote:
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!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#6>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOpDK_nNbrLIJejILsDx6v8qH7vi8hIdks5sQJeLgaJpZM4OfVTV>.
…-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
TheRobotStudio commented
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!
dusty-nv commented
OK thank you Cyril, I will add these commands to the pre-build script.
On Jul 21, 2017 10:45 AM, Cyril <notifications@github.com> wrote:
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<rbgirshick/py-faster-rcnn#221>:
sudo apt-get install python-gi-cairo
And now the demo is working!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOpDK_KGB5mJydKohpmxfV1oQsmwMfyYks5sQLlfgaJpZM4OfVTV>.
…-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------