kengz / SLM-Lab

Modular Deep Reinforcement Learning framework in PyTorch. Companion library of the book "Foundations of Deep Reinforcement Learning".
https://slm-lab.gitbook.io/slm-lab/
MIT License
1.23k stars 263 forks source link

Error when running "demo"-file #464

Closed benkoehl closed 3 years ago

benkoehl commented 3 years ago

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): dda02d00031553aeda4c49c5baa7d0706c53996b
  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 3 years ago

Hi @benkoehl Somebody raised this issue in the roboschool repo, including the solution (run sudo apt-get install libpcre16-3): https://github.com/openai/roboschool/issues/193#issuecomment-513122084

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.

benkoehl commented 3 years ago

That works. Thank you very much.

andrei-radulescu-banu commented 3 years ago

Here are the steps that worked for me:

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.