flowersteam / explauto

An autonomous exploration library
http://flowersteam.github.io/explauto
GNU General Public License v3.0
64 stars 27 forks source link

Missing dependencies in doc #47

Closed jgrizou closed 9 years ago

jgrizou commented 9 years ago

I just tried to install explauto. To have import explauto working, I had to also install matplotlib and pypot. Should we add those to the dependency list?

oudeyer commented 9 years ago

I guess pypot is only necessary if you want to do experiment using it, so probably it should not be the default case that pypot should be installed. Matplotlib is indeed more standard.

Le 6 oct. 2015 à 12:51, Jonathan Grizou notifications@github.com a écrit :

I just tried to install explauto. To have import explauto working, I had to also install matplotlib and pypot. Should we add those to the dependency list?

— Reply to this email directly or view it on GitHub.

clement-moulin-frier commented 9 years ago

Was it mandatory to install pypot? Normally it should be optional but if not, please tell us where was the problem when not installed. Thx

jgrizou commented 9 years ago

I tried everything again in brand new python env, in two ways.

The classic way:

pip install explauto
python -c "import explauto"
WORKS

So I guess it is fine, but as I will certainly develop things I wanted to install from source. Here is what led to the package complaints:

pip install numpy
pip install scipy
pip install scikit-learn

git clone https://github.com/flowersteam/explauto
cd explauto
python setup.py develop

python -c "import explauto"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "explauto/__init__.py", line 8, in <module>
    from .interest_model.interest_model import InterestModel
  File "explauto/interest_model/__init__.py", line 7, in <module>
    module = importlib.import_module('explauto.interest_model.{}'.format(mod_name))
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "explauto/interest_model/tree.py", line 4, in <module>
    import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot

pip install matplotlib

python -c "import explauto"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "explauto/__init__.py", line 9, in <module>
    from .environment.environment import Environment
  File "explauto/environment/__init__.py", line 7, in <module>
    module = importlib.import_module('explauto.environment.{}'.format(mod_name))
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "explauto/environment/pypot/__init__.py", line 1, in <module>
    from .pypot_robot import PypotEnvironment, environment, configurations, testcases
  File "explauto/environment/pypot/pypot_robot.py", line 9, in <module>
    import pypot
ImportError: No module named pypot

pip install pypot

python -c "import explauto"
WORKS
jgrizou commented 9 years ago

Just to update, after doing

pip install explauto
python -c "import explauto"

I tried

python -c "import pypot"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pypot

So pypot is not installed by the official package on pip, which is good.

clement-moulin-frier commented 9 years ago

OK I see, the problem is that pypot is in the list of environments by default.

@pierre-rouanet , do you think is it fine if we remove it? It can mean modifying some doc to tell people to manually add it if they want to use pypot. But we don't have such a doc (about pypot-explauto integration), do we? (OK we don't have people using it neither :)

pierre-rouanet commented 9 years ago

Yes no problem it makes sense to not have it as a default.

It would be nice to automatically loads the environment if they have installed using something like:

try:
  load_env_pypot(...)
except ImportError:
  pass

For the next release maybe.