Drake on Colab。安装和设置问题。
我在《 Unactactuated Robotics》一书的Colab scratchpad的Appendix A.3 Run an example链接上使用了安装和设置代码。我相信Colab在云上执行代码,因此无需在计算机上进行任何设置。我在Ubuntu 16.04 LTS上使用Firefox 66.0.2(64位)。
为方便起见,下面复制了我尝试运行的Colab暂存器代码:
# Install drake and the underactuated source repo (only if necessary) and set up the path. Run this first!
try:
import pydrake
import underactuated
except ImportError:
!curl -s https://raw.githubusercontent.com/RussTedrake/underactuated/master/scripts/setup/jupyter_setup.py > jupyter_setup.py
from jupyter_setup import setup_underactuated
setup_underactuated()
# Note: On Google's Colaboratory, this will take a minute, but should only need to reinstall once every 12 hours.
# Colab will ask you to "Reset all runtimes"; say no to save yourself the reinstall.
import os
underactuated_src_dir = os.path.dirname(os.path.dirname(os.path.abspath(underactuated.__file__)))
这是我得到的错误:
/bin/bash: underactuated/scripts/setup/ubuntu/16.04/install_prereqs: No such file or directory
NameErrorTraceback (most recent call last)
<ipython-input-1-2d88a7eca137> in <module>()
10
11 import os
---> 12 underactuated_src_dir = os.path.dirname(os.path.dirname(os.path.abspath(underactuated.__file__)))
NameError: name 'underactuated' is not defined
说明说,我应该在运行教科书中的任何示例之前运行此示例,因此我无法在Colab上运行任何示例。