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

Running Demo Dependency Issue #468

Closed fundmntlTheorem closed 3 years ago

fundmntlTheorem commented 3 years ago

I'm enjoying the book very much, thank you. I've got a VirtualBox created with Ubuntu 20.04.1 LTS to try out the SLM lab, and was able to get the code, and run ./bin/setup. The next step is to run your demo, which produces the following error. Do you have an idea about how to resolve this? I couldn't figure it out. I see that there is a linux regular expression library that probably is missing, but am not sure what the best way to fix it could be. I've attached the shell text would shows the setup's output as well.

https://www.pcre.org/original/doc/html/pcre16.html

Error logs

(base) philip@philip-VirtualBox:~/Documents/MachineLearning/SLM-Lab$ conda activate lab
(lab) philip@philip-VirtualBox:~/Documents/MachineLearning/SLM-Lab$ python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev
Traceback (most recent call last):
  File "run_lab.py", line 5, in <module>
    from slm_lab.experiment.control import Session, Trial, Experiment
  File "/home/philip/Documents/MachineLearning/SLM-Lab/slm_lab/experiment/control.py", line 7, in <module>
    from slm_lab.experiment import analysis, search
  File "/home/philip/Documents/MachineLearning/SLM-Lab/slm_lab/experiment/analysis.py", line 2, in <module>
    from slm_lab.spec import random_baseline
  File "/home/philip/Documents/MachineLearning/SLM-Lab/slm_lab/spec/random_baseline.py", line 7, in <module>
    import roboschool
  File "/home/philip/miniconda3/envs/lab/lib/python3.7/site-packages/roboschool/__init__.py", line 112, in <module>
    from roboschool.gym_pendulums import RoboschoolInvertedPendulum
  File "/home/philip/miniconda3/envs/lab/lib/python3.7/site-packages/roboschool/gym_pendulums.py", line 1, in <module>
    from roboschool.scene_abstract import SingleRobotEmptyScene
  File "/home/philip/miniconda3/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

slm_libprec_issue.txt

Thanks Philip

fundmntlTheorem commented 3 years ago

Update : I found a solution that worked for me here:

https://github.com/openai/roboschool/issues/193

sudo apt-get install libpcre16-3

fundmntlTheorem commented 3 years ago

I just saw in the history of issues this same one came up a few times. I missed it on first perusal, my bad.