kengz/SLM-Lab

Error when running "demo"-file

benkoehl opened this issue · 3 comments

Describe the bug
After installation according to instructions on

https://slm-lab.gitbook.io/slm-lab/setup/installation

I get the following error when running

$python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev

in the lab environment:

ImportError: libpcre16.so.3: cannot open shared object file: No such file or directory

To Reproduce

  1. OS and environment: Ubuntu 20.04
  2. SLM Lab git SHA (run git rev-parse HEAD to get it): dda02d0
  3. spec file used: ???

Additional context
???

Error logs

Traceback (most recent call last):
  File "run_lab.py", line 5, in <module>
    from slm_lab.experiment.control import Session, Trial, Experiment
  File "/home/SML Lab/SLM-Lab/slm_lab/experiment/control.py", line 7, in <module>
    from slm_lab.experiment import analysis, search
  File "/home/SML Lab/SLM-Lab/slm_lab/experiment/analysis.py", line 2, in <module>
    from slm_lab.spec import random_baseline
  File "/home//SML Lab/SLM-Lab/slm_lab/spec/random_baseline.py", line 7, in <module>
    import roboschool
  File "/home//anaconda3/envs/lab/lib/python3.7/site-packages/roboschool/__init__.py", line 112, in <module>
    from roboschool.gym_pendulums import RoboschoolInvertedPendulum
  File "/home/anaconda3/envs/lab/lib/python3.7/site-packages/roboschool/gym_pendulums.py", line 1, in <module>
    from roboschool.scene_abstract import SingleRobotEmptyScene
  File "/home/anaconda3/envs/lab/lib/python3.7/site-packages/roboschool/scene_abstract.py", line 12, in <module>
    from roboschool  import cpp_household   as cpp_household
ImportError: libpcre16.so.3: cannot open shared object file: No such file or directory
kengz commented

Hi @benkoehl
Somebody raised this issue in the roboschool repo, including the solution (run sudo apt-get install libpcre16-3): openai/roboschool#193 (comment)

If this still doesn't fix the issue, as a temporary workaround, you can comment out that line 7 import roboschool in the file /home//SML Lab/SLM-Lab/slm_lab/spec/random_baseline.py.

That works. Thank you very much.

Here are the steps that worked for me:

  • Install docker
  • Start an Ubuntu 16,04 container
  • Install conda from https://docs.continuum.io/anaconda/. Put conda executable in the PATH
  • conda update conda
  • conda init
  • Exit shell, reenter shell
  • git clone https://github.com/kengz/SLM-Lab.git
  • cd SLM-Lab/
  • . /bin/setup
  • conda activate lab
  • pip install future

Then, the demo example will run:
python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev

Note: You need Ubuntu 16.04. This will not work on Ubuntu 14.04, or 18.04. Nor on Centos 7.