openai / roboschool

DEPRECATED: Open-source software for robot simulation, integrated with OpenAI Gym.
Other
2.12k stars 487 forks source link

Import roboschool failure #112

Open kjnez opened 6 years ago

kjnez commented 6 years ago

I have successfully installed roboschool on Ubuntu 16.04 under Anaconda python 3.5.

When I open a python terminal and import roboschool, there's no problem: image But when I try to run python $ROBOSCHOOL_PATH/agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py, I have this error: image

I don't know what's happening here. Any help would be grateful.

khoa-ngo commented 6 years ago

have you tried: conda install libgcc

haoyuhaoyuhaoyu commented 6 years ago

the same error

kjnez commented 6 years ago

I tried conda install libgcc but that does not help. The same things happens.

khoa-ngo commented 6 years ago

Hi swiftwing and haoyuhaoyuhaoyu,

Would you mind copying and pasting the output of:

pip list
pip3 list
python -V
python3 -V

I also recommend downgrading python to 3.5.2

conda install python=3.5.2

I suspect the following might work for you:

python3 $ROBOSCHOOL_PATH/agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py
kjnez commented 6 years ago

pip list:

actionlib (1.11.11) alabaster (0.7.10) anaconda-client (1.6.5) anaconda-navigator (1.6.9) anaconda-project (0.8.0) angles (1.9.11) asn1crypto (0.22.0) astroid (1.5.3) astropy (2.0.2) atari-py (0.1.1) Babel (2.5.0) backports.shutil-get-terminal-size (1.0.0) base-local-planner (1.14.2) beautifulsoup4 (4.6.0) bitarray (0.8.1) bkcharts (0.2) blaze (0.11.3) bleach (1.5.0) bokeh (0.12.10) bondpy (1.8.1) boto (2.48.0) Bottleneck (1.2.1) camera-calibration (1.12.22) camera-calibration-parsers (1.11.13) catkin (0.7.8) catkin-pkg (0.4.1) certifi (2017.11.5) cffi (1.10.0) chainer (3.3.0) chardet (3.0.4) click (6.7) cloudpickle (0.4.0) clyent (1.2.2) colorama (0.3.9) contextlib2 (0.5.5) controller-manager-msgs (0.13.0) cryptography (2.0.3) cv-bridge (1.12.7) cycler (0.10.0) Cython (0.26.1) cytoolz (0.8.2) dask (0.15.3) datashape (0.5.4) decorator (4.1.2) diagnostic-analysis (1.9.2) diagnostic-common-diagnostics (1.9.2) diagnostic-updater (1.9.2) distributed (1.19.1) docutils (0.14) dynamic-reconfigure (1.5.48) entrypoints (0.2.3) enum34 (1.1.6) et-xmlfile (1.0.1) fastcache (1.0.2) filelock (2.0.12) Flask (0.12.2) Flask-Cors (3.0.3) future (0.16.0) gazebo-plugins (2.5.14) gazebo-ros (2.5.14) gencpp (0.5.5) geneus (2.2.6) genlisp (0.4.16) genmsg (0.5.9) gennodejs (2.0.1) genpy (0.6.7) geodesy (0.5.2) gevent (1.2.2) glob2 (0.5) gmpy2 (2.0.8) greenlet (0.4.12) gym (0.9.3, /home/k/gym) h5py (2.7.0) heapdict (1.0.0) html5lib (0.9999999) idna (2.6) image-geometry (1.12.7) imageio (2.2.0) imagesize (0.7.1) interactive-markers (1.11.3) ipykernel (4.6.1) ipython (6.1.0) ipython-genutils (0.2.0) ipywidgets (7.0.0) isort (4.2.15) itsdangerous (0.24) jdcal (1.3) jedi (0.10.2) Jinja2 (2.9.6) jsonschema (2.6.0) jupyter-client (5.1.0) jupyter-console (5.2.0) jupyter-core (4.3.0) jupyterlab (0.27.0) jupyterlab-launcher (0.4.0) Keras (2.1.3) laser-geometry (1.6.4) lazy-object-proxy (1.3.1) llvmlite (0.20.0) locket (0.2.0) lxml (4.1.0) Markdown (2.6.11) MarkupSafe (1.0) matplotlib (2.1.0) mccabe (0.6.1) message-filters (1.12.12) mistune (0.7.4) moveit-commander (0.9.11) moveit-ros-planning-interface (0.9.11) moveit-ros-visualization (0.9.11) mpmath (0.19) msgpack-python (0.4.8) mujoco-py (0.5.7) multipledispatch (0.4.9) navigator-updater (0.1.0) nbconvert (5.3.1) nbformat (4.4.0) networkx (2.0) nltk (3.2.4) nose (1.3.7) notebook (5.0.0) numba (0.35.0+10.g143f70e90) numexpr (2.6.2) numpy (1.14.0) numpydoc (0.7.0) odo (0.5.1) olefile (0.44) openpyxl (2.4.8) pachi-py (0.0.21) packaging (16.8) pandas (0.20.3) pandocfilters (1.4.2) partd (0.3.8) path.py (10.3.1) pathlib2 (2.3.0) patsy (0.4.1) pep8 (1.7.0) pexpect (4.2.1) pickleshare (0.7.4) Pillow (5.0.0) pip (9.0.1) pkginfo (1.4.1) pluginlib (1.11.2) ply (3.10) prompt-toolkit (1.0.15) protobuf (3.5.1) psutil (5.4.0) ptyprocess (0.5.2) py (1.4.34) pycodestyle (2.3.1) pycosat (0.6.2) pycparser (2.18) pycrypto (2.6.1) pycurl (7.43.0) pyflakes (1.6.0) pyglet (1.3.0) Pygments (2.2.0) pylint (1.7.4) pyodbc (4.0.17) PyOpenGL (3.1.0) pyOpenSSL (17.2.0) pyparsing (2.2.0) PySocks (1.6.7) pytest (3.2.1) python-dateutil (2.6.1) python-qt-binding (0.3.3) pytz (2017.2) PyWavelets (0.5.2) PyYAML (3.12) pyzmq (16.0.2) qt-dotgraph (0.3.8) qt-gui (0.3.8) qt-gui-cpp (0.3.8) qt-gui-py-common (0.3.8) QtAwesome (0.4.4) qtconsole (4.3.1) QtPy (1.3.1) requests (2.18.4) resource-retriever (1.12.3) rope (0.10.5) rosbag (1.12.12) rosboost-cfg (1.13.6) rosclean (1.13.6) roscreate (1.13.6) rosgraph (1.12.12) roslaunch (1.12.12) roslib (1.13.6) roslint (0.11.0) roslz4 (1.12.12) rosmake (1.13.6) rosmaster (1.12.12) rosmsg (1.12.12) rosnode (1.12.12) rosparam (1.12.12) rospkg (1.1.4) rospy (1.12.12) rosservice (1.12.12) rostest (1.12.12) rostopic (1.12.12) rosunit (1.13.6) roswtf (1.12.12) rqt-action (0.4.9) rqt-bag (0.4.11) rqt-bag-plugins (0.4.11) rqt-console (0.4.8) rqt-dep (0.4.8) rqt-graph (0.4.9) rqt-gui (0.5.0) rqt-gui-py (0.5.0) rqt-image-view (0.4.11) rqt-launch (0.4.8) rqt-logger-level (0.4.8) rqt-moveit (0.5.7) rqt-msg (0.4.8) rqt-nav-view (0.5.7) rqt-plot (0.4.8) rqt-pose-view (0.5.8) rqt-publisher (0.4.8) rqt-py-common (0.5.0) rqt-py-console (0.4.8) rqt-reconfigure (0.4.8) rqt-robot-dashboard (0.5.7) rqt-robot-monitor (0.5.7) rqt-robot-steering (0.5.8) rqt-runtime-monitor (0.5.7) rqt-rviz (0.5.7) rqt-service-caller (0.4.8) rqt-shell (0.4.9) rqt-srv (0.4.8) rqt-tf-tree (0.5.8) rqt-top (0.4.8) rqt-topic (0.4.10) rqt-web (0.4.8) ruamel-yaml (0.11.14) rviz (1.12.15) scikit-image (0.13.0) scikit-learn (0.19.1) scipy (1.0.0) seaborn (0.8) sensor-msgs (1.12.5) setuptools (38.4.0) simplegeneric (0.8.1) singledispatch (3.4.0.3) six (1.11.0) smach (2.0.1) smach-ros (2.0.1) smclib (1.8.1) snowballstemmer (1.2.1) sortedcollections (0.5.3) sortedcontainers (1.5.7) Sphinx (1.6.3) sphinxcontrib-websupport (1.0.1) spyder (3.2.4) SQLAlchemy (1.1.13) srdfdom (0.4.2) statsmodels (0.8.0) sympy (1.1.1) tables (3.4.2) tblib (1.3.2) tensorflow (1.4.1) tensorflow-gpu (1.4.1) tensorflow-tensorboard (0.4.0rc3) terminado (0.6) testpath (0.3.1) tf (1.11.9) tf-conversions (1.11.9) tf2-geometry-msgs (0.5.17) tf2-kdl (0.5.17) tf2-py (0.5.17) tf2-ros (0.5.17) tf2-sensor-msgs (0.5.17) Theano (1.0.1) toolz (0.8.2) topic-tools (1.12.12) tornado (4.5.2) traitlets (4.3.2) typing (3.6.2) unicodecsv (0.14.1) unique-id (1.0.5) urdfdom-py (0.3.3) urllib3 (1.22) wcwidth (0.1.7) webencodings (0.5.1) Werkzeug (0.14.1) wheel (0.30.0) widgetsnbextension (3.0.2) wrapt (1.10.11) xacro (1.11.2) xlrd (1.1.0) XlsxWriter (1.0.2) xlwt (1.3.0) zict (0.1.3)

pip3 list:

actionlib (1.11.11) angles (1.9.11) apturl (0.5.2) atari-py (0.1.1) base-local-planner (1.14.2) beautifulsoup4 (4.4.1) blinker (1.3) bondpy (1.8.1) Brlapi (0.6.4) camera-calibration (1.12.22) camera-calibration-parsers (1.11.13) catkin (0.7.8) catkin-pkg (0.3.9) certifi (2017.11.5) chardet (3.0.4) checkbox-support (0.22) command-not-found (0.3) controller-manager-msgs (0.13.0) cryptography (1.2.3) cv-bridge (1.12.7) cycler (0.9.0) decorator (4.0.6) defer (1.0.6) defusedxml (0.4.1) diagnostic-analysis (1.9.2) diagnostic-common-diagnostics (1.9.2) diagnostic-updater (1.9.2) docutils (0.14) dynamic-reconfigure (1.5.48) feedparser (5.1.3) future (0.16.0) gazebo-plugins (2.5.14) gazebo-ros (2.5.14) gencpp (0.5.5) geneus (2.2.6) genlisp (0.4.16) genmsg (0.5.9) gennodejs (2.0.1) genpy (0.6.7) geodesy (0.5.2) guacamole (0.9.2) gym (0.9.4) gym-gazebo (0.0.2, /home/k/gym-gazebo) h5py (2.7.1) html5lib (0.999) httplib2 (0.9.1) idna (2.6) image-geometry (1.12.7) imageio (2.2.0) interactive-markers (1.11.3) Jinja2 (2.8) Keras (2.1.3) language-selector (0.1) laser-geometry (1.6.4) louis (2.6.4) lxml (3.5.0) Mako (1.0.3) MarkupSafe (0.23) matplotlib (1.5.1) message-filters (1.12.12) moveit-commander (0.9.11) moveit-ros-planning-interface (0.9.11) moveit-ros-visualization (0.9.11) mujoco-py (0.5.7) nose (1.3.7) numpy (1.14.0) oauthlib (1.0.3) onboard (1.2.0) pachi-py (0.0.21) padme (1.1.1) pexpect (4.0.1) Pillow (5.0.0) pip (9.0.1) plainbox (0.25) pluginlib (1.11.2) ptyprocess (0.5) pyasn1 (0.1.9) pycups (1.9.73) pycurl (7.43.0) pyglet (1.3.0) pygobject (3.20.0) PyJWT (1.3.0) PyOpenGL (3.1.0) pyparsing (2.0.3) python-apt (1.1.0b1) python-dateutil (2.6.1) python-debian (0.1.27) python-qt-binding (0.3.3) python-systemd (231) pytz (2014.10) pyxdg (0.25) PyYAML (3.12) qt-dotgraph (0.3.8) qt-gui (0.3.8) qt-gui-cpp (0.3.8) qt-gui-py-common (0.3.8) reportlab (3.3.0) requests (2.18.4) resource-retriever (1.12.3) roboschool (1.0, /home/k/roboschool) rosbag (1.12.12) rosboost-cfg (1.13.6) rosclean (1.13.6) roscreate (1.13.6) rosgraph (1.12.12) roslaunch (1.12.12) roslib (1.13.6) roslint (0.11.0) roslz4 (1.12.12) rosmake (1.13.6) rosmaster (1.12.12) rosmsg (1.12.12) rosnode (1.12.12) rosparam (1.12.12) rospkg (1.1.4) rospy (1.12.12) rosservice (1.12.12) rostest (1.12.12) rostopic (1.12.12) rosunit (1.13.6) roswtf (1.12.12) rqt-action (0.4.9) rqt-bag (0.4.11) rqt-bag-plugins (0.4.11) rqt-console (0.4.8) rqt-dep (0.4.8) rqt-graph (0.4.9) rqt-gui (0.5.0) rqt-gui-py (0.5.0) rqt-image-view (0.4.11) rqt-launch (0.4.8) rqt-logger-level (0.4.8) rqt-moveit (0.5.7) rqt-msg (0.4.8) rqt-nav-view (0.5.7) rqt-plot (0.4.8) rqt-pose-view (0.5.8) rqt-publisher (0.4.8) rqt-py-common (0.5.0) rqt-py-console (0.4.8) rqt-reconfigure (0.4.8) rqt-robot-dashboard (0.5.7) rqt-robot-monitor (0.5.7) rqt-robot-steering (0.5.8) rqt-runtime-monitor (0.5.7) rqt-rviz (0.5.7) rqt-service-caller (0.4.8) rqt-shell (0.4.9) rqt-srv (0.4.8) rqt-tf-tree (0.5.8) rqt-top (0.4.8) rqt-topic (0.4.10) rqt-web (0.4.8) rviz (1.12.15) scikit-image (0.10.1) scipy (1.0.0) screen-resolution-extra (0.0.0) sensor-msgs (1.12.5) sessioninstaller (0.0.0) setuptools (20.7.0) six (1.11.0) smach (2.0.1) smach-ros (2.0.1) smclib (1.8.1) srdfdom (0.4.2) ssh-import-id (5.5) system-service (0.3) tf (1.11.9) tf-conversions (1.11.9) tf2-geometry-msgs (0.5.17) tf2-kdl (0.5.17) tf2-py (0.5.17) tf2-ros (0.5.17) tf2-sensor-msgs (0.5.17) Theano (1.0.1) topic-tools (1.12.12) ubuntu-drivers-common (0.0.0) ufw (0.35) unattended-upgrades (0.1) unique-id (1.0.5) unity-scope-calculator (0.1) unity-scope-chromiumbookmarks (0.1) unity-scope-colourlovers (0.1) unity-scope-devhelp (0.1) unity-scope-firefoxbookmarks (0.1) unity-scope-gdrive (0.7) unity-scope-manpages (0.1) unity-scope-openclipart (0.1) unity-scope-texdoc (0.1) unity-scope-tomboy (0.1) unity-scope-virtualbox (0.1) unity-scope-yelp (0.1) unity-scope-zotero (0.1) urdfdom-py (0.3.3) urllib3 (1.22) usb-creator (0.3.0) vcstool (0.1.32) wheel (0.29.0) xacro (1.11.2) xdiagnose (3.8.4.1) xkit (0.0.0) XlsxWriter (0.7.3)

python -V:

Python 3.5.4 :: Anaconda custom (64-bit)

python3 -V:

Python 3.5.4 :: Anaconda custom (64-bit)

Unfortunately python3 $ROBOSCHOOL_PATH/agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py doesn't work for me:

Traceback (most recent call last): File "agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py", line 2, in import roboschool ImportError: No module named 'roboschool'

khoa-ngo commented 6 years ago

Can you try redefining your ROBOSCHOOL_PATH again and do:

pip install -e $ROBOSCHOOL_PATH
kjnez commented 6 years ago

I just did it. Although it says successfully installed, when I run pip list, 'roboschool' is still not there. Also, when I run python3 $ROBOSCHOOL_PATH/agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py, it still says: ImportError: No module named 'roboschool'.

khoa-ngo commented 6 years ago

That's strange.. were you inside Anaconda environment during installation and running pip list?

kjnez commented 6 years ago

Yes, I was inside Anaconda environment.

khoa-ngo commented 6 years ago

Maybe this could help you. I've just put together a Virtualbox image of Ubuntu 16.04 with working roboschool and gym, tested with Virtualbox Version 5.2.6 r120293: Virtualbox download, Image download, password: openai123.

After booting the image with Virtualbox, you should be able to use roboschool. (Proceed to step 10 to test)

This is what was done to set up the image:

  1. Install ubuntu-16.04.3-desktop-amd64 in new Virtualbox machine
  2. Update package list and install newest package version:
    sudo apt-get update
    sudo apt-get upgrade
  3. Install pip for python and python3 (Python versions 2.7.12 and 3.5.2 respectively)
    sudo apt-get install curl
    curl -O https://bootstrap.pypa.io/get-pip.py
    sudo python get-pip.py
    sudo python3 get-pip.py
  4. Installing gym
    sudo pip3 install gym
  5. Clone roboschool
    sudo apt-get install git
    cd
    mkdir GitHub
    cd GitHub
    git clone https://github.com/openai/roboschool
    cd roboschool
    pwd
  6. Define ROBOSCHOOL_PATH
    export ROBOSCHOOL_PATH=/home/roboschool/GitHub/roboschool
  7. Install roboschool dependencies
    sudo apt install cmake ffmpeg pkg-config qtbase5-dev libqt5opengl5-dev libassimp-dev libpython3.5-dev libboost-python-dev libtinyxml-dev
  8. Install Bullet
    cd
    cd GitHub
    git clone https://github.com/olegklimov/bullet3 -b roboschool_self_collision
    mkdir bullet3/build
    cd bullet3/build
    cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=1 -DCMAKE_INSTALL_PREFIX:PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_EXTRAS=OFF  -DBUILD_UNIT_TESTS=OFF -DBUILD_CLSOCKET=OFF -DBUILD_ENET=OFF -DBUILD_OPENGL3_DEMOS=OFF ..
    make -j4
    make install
    cd ../..
  9. Install roboschool
    sudo pip3 install -e $ROBOSCHOOL_PATH
  10. Testing
    python3 $ROBOSCHOOL_PATH/agent_zoo/RoboschoolHumanoidFlagrun_v0_2017may.py

At the very least, I hope this can get you up and going with roboschool.

kjnez commented 6 years ago

Thank you very much.

jt-weller commented 6 years ago

I see from the command 'pip list' that pluginlib (1.11.2) is listed. How can I download it?