google-research / football

Check out the new game server:
https://research-football.dev
Apache License 2.0
3.35k stars 1.29k forks source link

'baselines' missing / needs mujoco after issue #1 workaround #2

Closed nczempin closed 5 years ago

nczempin commented 5 years ago

I was able to get it built with the change suggested in issue #1.

However, when trying to run python3 -m gfootball.play_game, I get ModuleNotFoundError: No module named 'baselines', and when I try to do pip3 install baselines, I get Exception: You appear to be missing MuJoCo.

I don't think I should need MuJoCo to get the football stuff running.

I'm on Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-50-generic x86_64)

cyfra commented 5 years ago

Don't install the "baselines" directly from pip. (the version in there is over a year old and some functions have different signatures).

Does this issue also show up, when you install baselines from the current git ?

nczempin commented 5 years ago

I am/was a bit confused why I even need to install baselines in the first place; I thought the suggested change in issue #1 was meant to take care of that?

cyfra commented 5 years ago

The baselines library is needed (we use it a little in the environment and in the examples).

nczempin commented 5 years ago

The baselines library is needed (we use it a little in the environment and in the examples).

What I meant was "why do I even have to install it manually?"

cyfra commented 5 years ago

What command did you run, when you installed the football env for the first time ?

What you can try is:

This should not ask for Mujoco anymore.

nczempin commented 5 years ago

hang on, I seem to have a whole zoo of different python versions on my machine, some via ubuntu, some anaconda, some miniconda. let me clean up this mess and get back to you

nczempin commented 5 years ago

As far as I can tell, that error is fixed by my cleanup.

Now I'm getting an error because apparently cuda 10.0 is expected but I only have 10.1

wbhstudy commented 5 years ago

root@f869a41fc79e:/# pip3 install "git+https://github.com/openai/baselines.git@master#egg=baselines-0.1.6" Collecting baselines-0.1.6 from git+https://github.com/openai/baselines.git@master#egg=baselines-0.1.6 Cloning https://github.com/openai/baselines.git (to revision master) to /tmp/pip-install-31axpame/baselines-0.1.6 Running command git clone -q https://github.com/openai/baselines.git /tmp/pip-install-31axpame/baselines-0.1.6 WARNING: Generating metadata for package baselines-0.1.6 produced metadata for project name baselines. Fix your #egg=baselines-0.1.6 fragments. Requirement already satisfied (use --upgrade to upgrade): baselines from git+https://github.com/openai/baselines.git@master#egg=baselines-0.1.6 in /gfootball/baselines Requirement already satisfied: click in /usr/local/lib/python3.6/dist-packages (from baselines) (7.0) Requirement already satisfied: cloudpickle in /usr/local/lib/python3.6/dist-packages (from baselines) (1.2.1) Requirement already satisfied: gym<1.0.0,>=0.10.0 in /usr/local/lib/python3.6/dist-packages/gym-0.12.5-py3.6.egg (from baselines) (0.12.5) Requirement already satisfied: joblib in /usr/local/lib/python3.6/dist-packages (from baselines) (0.13.2) Requirement already satisfied: opencv-python in /usr/local/lib/python3.6/dist-packages/opencv_python-4.1.0.25-py3.6-linux-x86_64.egg (from baselines) (4.1.0.25) Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages/scipy-1.3.0-py3.6-linux-x86_64.egg (from baselines) (1.3.0) Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from baselines) (4.32.1) Requirement already satisfied: numpy>=1.10.4 in /usr/local/lib/python3.6/dist-packages (from gym<1.0.0,>=0.10.0->baselines) (1.16.4) Requirement already satisfied: pyglet>=1.2.0 in /usr/local/lib/python3.6/dist-packages (from gym<1.0.0,>=0.10.0->baselines) (1.3.2) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from gym<1.0.0,>=0.10.0->baselines) (1.11.0) Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from pyglet>=1.2.0->gym<1.0.0,>=0.10.0->baselines) (0.17.1) Building wheels for collected packages: baselines, baselines Building wheel for baselines (setup.py) ... done Stored in directory: /tmp/pip-ephem-wheel-cache-8m9vai8r/wheels/47/4b/a3/0a25aebc24e2f3302802b56aef9855b3bc7bb051cc5bc3debd Building wheel for baselines (setup.py) ... error ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-31axpame/baselines/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', op en)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-p_4lw153 --python-tag cp36: ERROR: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/tokenize.py", line 452, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-31axpame/baselines/setup.py'

ERROR: Failed building wheel for baselines Running setup.py clean for baselines ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-31axpame/baselines/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', op en)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' clean --all: ERROR: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/tokenize.py", line 452, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-31axpame/baselines/setup.py'

ERROR: Failed cleaning build dir for baselines Successfully built baselines Failed to build baselines

psymbio commented 3 years ago

says: ERROR: Could not find a version that satisfies the requirement baselines-0-1-6 (unavailable) ERROR: No matching distribution found for baselines-0-1-6 (unavailable)

vi3itor commented 3 years ago

@psymbio It's probably because you have Tensorflow 2 installed, but master branch of the baselines supports Tensorflow up to 1.14. You can either install Tensorflow 1 (use supported version of python3 in such case) or try using tf2 branch of the baselines: pip3 install "git+https://github.com/openai/baselines.git@tf2"