huggingface/deep-rl-class

apt install swig cmake -> syntax error

AndreMilota opened this issue · 2 comments

Describe the bug

the first thing it tells us to type into colab is:
apt install swig cmake
this causes a syntax error

File "", line 1
apt install swig cmake
^
SyntaxError: invalid syntax

After 30 or 40 min of searching the web I asked chat GPT and it said to run
!apt-get install -y swig cmake
this seems to work
All hail our new robot master (even if it is working on a 3 year old data set (which is why I did not try this first)
I do not know if it is correct and will wonder if it will lead to a bug later

Material

this also crashes but I was able to fix it:

sudo apt-get update
apt install python-opengl
apt install ffmpeg
apt install xvfb
pip3 install pyvirtualdisplay

and then wen I ran the 5th block of code I got a cryptic warning with a recommendation that I don't know weather I should follow
import gymnasium

from huggingface_sb3 import load_from_hub, package_to_hub
from huggingface_hub import (
notebook_login,
) # To log to our Hugging Face account to be able to upload models to the Hub.

from stable_baselines3 import PPO
from stable_baselines3.common.env_util import make_vec_env
from stable_baselines3.common.evaluation import evaluate_policy
from stable_baselines3.common.monitor import Monitor

/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/init.py:4: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if not hasattr(tensorboard, "version") or LooseVersion(

Hey there 👋 if you use Colab you need to use the colab link instead. The hands-on page is only if you want to train on your own computer.

https://colab.research.google.com/github/huggingface/deep-rl-class/blob/master/notebooks/unit1/unit1.ipynb

@AndreMilota this is just depreciation warning not critical 😄