kengz/SLM-Lab

Installation on MacOs 11.6.1 fails

vecorro opened this issue · 2 comments

Describe the bug
If I follow the book's instructions to install SML-LAB from https://slm-lab.gitbook.io/slm-lab/publications-and-talks/instruction-for-the-book-+-intro-to-rl-section in a Mac running MacOs 11.6.1 (20G224) the GCC compilation that install Pip dependencies fails with multiple errors:

To Reproduce

  1. OS and environment: MacOs 11.6.1 (20G224), SLM-LAB downloaded on the date of this report generation.

Additional context
Add any other context about the problem here.

Error logs

 In file included from examples/OpenGLWindow/MacOpenGLWindowObjC.m:5:
    In file included from examples/OpenGLWindow/MacOpenGLWindowObjC.h:6:
    examples/OpenGLWindow/../CommonInterfaces/CommonCallbacks.h:9:33: warning: this function declaration is not a prototype [-Wstrict-prototypes]
    typedef void (*b3RenderCallback)();
                                    ^
                                     void
    In file included from examples/OpenGLWindow/MacOpenGLWindowObjC.m:5:
    examples/OpenGLWindow/MacOpenGLWindowObjC.h:32:52: warning: this function declaration is not a prototype [-Wstrict-prototypes]
            struct MacOpenGLWindowInternalData* Mac_createData();
                                                              ^
                                                               void
    2 warnings generated.
    2 warnings generated.
    1 warning generated.
    18 warnings generated.
    3 warnings generated.
    8 warnings generated.
    17 warnings generated.
    62 warnings generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/Users/kike/opt/miniconda3/envs/lab/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/b1/cqdxbbvx3dgcj0s1phwqxtlm0000gn/T/pip-install-exupdu5v/pybullet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b1/cqdxbbvx3dgcj0s1phwqxtlm0000gn/T/pip-record-buir4bf9/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b1/cqdxbbvx3dgcj0s1phwqxtlm0000gn/T/pip-install-exupdu5v/pybullet/

failed

CondaEnvException: Pip failed

I had this same issue on macOS 11.4. The core issue is that pybullet version 2.8.4 installation fails. Direct installation via pip install pybullet==2.8.4 also fails.

I had to update the pybullet version to 2.9.0 in environment.yml in order for installation to succeed.
After installing this way and running pytest, all tests succeed except for all tests in the test/spec/test_dist_spec.py, but I think those failures are a separate issue (lots of FileNotFoundError errors which probably requires some other setup).

Running python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev succeeds for me now. There doesn't appear to be any problems, but I'm just getting started with the book, so not sure if upgrading pybullet will affect anything else.

Thanks, @cpwhidden! Looks like we are hitting the same issue. I see too many errors in the Mac installation process so I decided that it'd be very time-consuming to make SLM-lab work on a recent macOS version. I just created a VM with Ubuntu 20.04 and the installation process there was relatively smooth. I think that one thing that the SLM developers might want to consider is to release it in the form of a Docker image so people can run it on any platform and get straight into experimentation. This could also be a solution for people using Windows.