jhu-lcsr / costar_plan

Integrating learning and task planning for robots with Keras, including simulation, real robot, and multiple dataset support.
https://sites.google.com/site/costardataset
Apache License 2.0
69 stars 23 forks source link

Travis does not install python packages properly #163

Closed cpaxton closed 7 years ago

cpaxton commented 7 years ago
3.09s$ $CI_SOURCE_PATH/costar_task_plan/tests/task_test.py
pybullet build time: Aug 17 2017 04:18:10
[2017-08-17 04:27:03,449] You have 'numpy' version 1.8.2 installed, but 'gym' requires at least 1.10.4. HINT: upgrade via 'pip install -U numpy'.
Using TensorFlow backend.
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
[WARNING] simulation requires pybullet3
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
[WARNING] ROS/CoSTAR failed to import. ROS may be missing.
No module named sklearn.mixture
[WARNING] keras/tensorflow required for some tools
cannot import name np_utils
Traceback (most recent call last):
  File "/home/travis/build/cpaxton/costar_plan/costar_task_plan/tests/task_test.py", line 5, in <module>
    from costar_task_plan.abstract import Task
  File "/home/travis/costar_ws/devel/lib/python2.7/dist-packages/costar_task_plan/__init__.py", line 35, in <module>
    exec(__fh.read())
  File "<string>", line 50, in <module>
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/gym/__init__.py", line 13, in <module>
    from bullet import *
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/gym/bullet.py", line 8, in <module>
    from costar_task_plan.simulation import CostarBulletSimulation
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/simulation/__init__.py", line 3, in <module>
    from parse import ParseBulletArgs
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/simulation/parse.py", line 2, in <module>
    from costar_task_plan.agent import GetAgents
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/agent/__init__.py", line 3, in <module>
    from keras_ddpg import *
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/agent/keras_ddpg.py", line 3, in <module>
    from keras.models import Sequential, Model
  File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/__init__.py", line 2, in <module>
    from . import np_utils
ImportError: cannot import name np_utils
The command "$CI_SOURCE_PATH/costar_task_plan/tests/task_test.py" exited with 1.
1.81s$ $CI_SOURCE_PATH/costar_task_plan/tests/cem_test.py
pybullet build time: Aug 17 2017 04:18:10
[2017-08-17 04:27:05,311] You have 'numpy' version 1.8.2 installed, but 'gym' requires at least 1.10.4. HINT: upgrade via 'pip install -U numpy'.

Using TensorFlow backend.

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
[WARNING] simulation requires pybullet3
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
[WARNING] ROS/CoSTAR failed to import. ROS may be missing.
No module named sklearn.mixture
[WARNING] keras/tensorflow required for some tools

cannot import name np_utils
Traceback (most recent call last):
  File "/home/travis/build/cpaxton/costar_plan/costar_task_plan/tests/cem_test.py", line 7, in <module>
    from costar_task_plan.trainers import CemTrainer
  File "/home/travis/costar_ws/devel/lib/python2.7/dist-packages/costar_task_plan/__init__.py", line 35, in <module>
    exec(__fh.read())
  File "<string>", line 50, in <module>
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/gym/__init__.py", line 13, in <module>
    from bullet import *
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/gym/bullet.py", line 8, in <module>
    from costar_task_plan.simulation import CostarBulletSimulation
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/simulation/__init__.py", line 3, in <module>
    from parse import ParseBulletArgs
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/simulation/parse.py", line 2, in <module>
    from costar_task_plan.agent import GetAgents
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/agent/__init__.py", line 3, in <module>
    from keras_ddpg import *
  File "/home/travis/costar_ws/src/costar_plan/costar_task_plan/python/costar_task_plan/agent/keras_ddpg.py", line 3, in <module>
    from keras.models import Sequential, Model
  File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/__init__.py", line 2, in <module>
    from . import np_utils
ImportError: cannot import name np_utils
ahundt commented 7 years ago

A workaround like the following may be needed: https://github.com/ahundt/robotics_setup/blob/d413b0ea4abf18d288f688dfbdb8727d908b3b8e/python.sh

            # install ubuntu python package
            sudo apt-get install -y python-setuptools python-dev build-essential

            # workaround for pip 8.1.2 failing to upgrade on Ubuntu 16.04
            # see https://github.com/pypa/pip/issues/3776
            curl -o $HOME/Downloads/get-pip.py https://bootstrap.pypa.io/get-pip.py
            sudo python3 $HOME/Downloads/get-pip.py --user

I think these travis scripts could really benefit from using robotics_setup. It contains many workarounds I update continuously as I encounter them. We can simply lock to a specific hashed version and update only when specific fixes are needed, that's what I do in grl.

cpaxton commented 7 years ago

seems fixed