PufferLib is also available as a standard pip package.
pip install pufferlib
To install additional environments and frameworks:
pip install pufferlib[nmmo,cleanrl]
Note that some environments require additional non-pip dependencies. Follow the additional setup from the maintainers of that environment, or just use PufferTank.
When I run sudo pip install "pufferlib[nmmo,cleanrl]", following is the output:
/usr/bin/pip:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import load_entry_point
Requirement already satisfied: pufferlib[cleanrl,nmmo] in /usr/local/lib/python3.8/dist-packages (0.5.1)
Requirement already satisfied: numpy==1.23.3 in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (1.23.3)
Requirement already satisfied: opencv-python==3.4.17.63 in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (3.4.17.63)
Requirement already satisfied: cython==3.0.0 in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (3.0.0)
Requirement already satisfied: tensorboard==2.11.2; extra == "cleanrl" in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (2.11.2)
Requirement already satisfied: torch; extra == "cleanrl" in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (1.13.1)
Requirement already satisfied: wandb==0.13.7; extra == "cleanrl" in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (0.13.7)
Collecting psutil==5.9.5; extra == "cleanrl"
Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Requirement already satisfied: gymnasium==0.29.1; extra == "nmmo" in /usr/local/lib/python3.8/dist-packages (from pufferlib[cleanrl,nmmo]) (0.29.1)
Collecting gym==0.21; extra == "nmmo"
Using cached gym-0.21.0.tar.gz (1.5 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vx_l_jcn/gym/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vx_l_jcn/gym/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-vx_l_jcn/gym/pip-egg-info
cwd: /tmp/pip-install-vx_l_jcn/gym/
Complete output (1 lines):
error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
System Information:
As per the instructions given at PufferLib 0.5.0 Documentation,
When I run
sudo pip install "pufferlib[nmmo,cleanrl]"
, following is the output:pip list output: