ubuntu@ip-172-31-23-81:~/cleanrl$ python3 cleanrl/ppo.py --env-id CartPole-v1
/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/tensorboard/__init__.py:4: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if not hasattr(tensorboard, "__version__") or LooseVersion(
/home/ubuntu/.local/lib/python3.10/site-packages/torch/random.py:42: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xe (Triggered internally at /root/pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)
return default_generator.manual_seed(seed)
/home/ubuntu/.local/lib/python3.10/site-packages/gym/core.py:172: DeprecationWarning: WARN: Function `env.seed(seed)` is marked as deprecated and will be removed in the future. Please use `env.reset(seed=seed) instead.
deprecation(
Traceback (most recent call last):
File "/home/ubuntu/cleanrl/cleanrl/ppo.py", line 202, in <module>
next_obs, reward, done, info = envs.step(action.cpu().numpy())
RuntimeError: Numpy is not available
Expected Behavior
python3 cleanrl/ppo.py --env-id CartPole-v1 should run successfully.
Problem Description
The documentation says that it should work on
Python >=3.7.1,<3.11
. I can run and debug models using python 3.8.2 but not python 3.10.12).Checklist
pip install -r requirements/requirements.txt
(see CleanRL's installation guideline.Current Behavior
I'm getting the following error:
Expected Behavior
python3 cleanrl/ppo.py --env-id CartPole-v1
should run successfully.Possible Solution
upgrade numpy version to the latest (I validated it with 1.26.0) and it worked. https://github.com/vwxyzjn/cleanrl/blob/master/requirements/requirements.txt#L35
Steps to Reproduce
Ubuntu 22.04.2 LTS
). alternatively use IntelliJ on MacOs with python virtual environmentgit clone https://github.com/vwxyzjn/cleanrl.git && cd cleanrl
pip install -r requirements/requirements.txt
python3 cleanrl/ppo.py --env-id CartPole-v1