PufferAI / PufferLib

Simplifying reinforcement learning for complex game environments
https://pufferai.github.io/
MIT License
1.23k stars 58 forks source link

Cannot Import name 'DirectoryPolicyStore' from 'pufferlib.policy_store' #63

Closed n1ghtf4l1 closed 5 months ago

n1ghtf4l1 commented 10 months ago

System Information:

As per the instructions given at PufferLib 0.5.0 Documentation,

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.

pip list output:

Package                      Version
---------------------------- --------------------
absl-py                      1.4.0
accelerate                   0.21.0
addict                       2.4.0
aicrowd-cli                  0.1.15
aiobotocore                  2.5.4
aiofiles                     22.1.0
aiohttp                      3.8.5
aioitertools                 0.11.0
aiosignal                    1.3.1
aiosqlite                    0.19.0
ansi2html                    1.9.1
antlr4-python3-runtime       4.9.3
anyio                        4.0.0
argon2-cffi                  23.1.0
argon2-cffi-bindings         21.2.0
art                          5.5
asciitree                    0.3.3
astor                        0.8.1
astroid                      2.15.8
asttokens                    2.4.0
astunparse                   1.6.3
async-timeout                4.0.3
attrs                        23.1.0
audioread                    3.0.1
autobahn                     19.3.3
Automat                      0.8.0
Babel                        2.12.1
backcall                     0.2.0
beautifulsoup4               4.12.2
bitsandbytes                 0.41.1
bleach                       6.0.0
blinker                      1.4
botocore                     1.31.17
cachetools                   5.3.1
certifi                      2023.7.22
cffi                         1.15.1
cftime                       1.6.2
chaospy                      4.3.13
chardet                      3.0.4
charset-normalizer           3.2.0
click                        7.1.2
cloud-init                   23.1.2
cloudpickle                  3.0.0
cmake                        3.27.4.1
colorama                     0.4.3
comm                         0.1.4
command-not-found            0.3
commonmark                   0.9.1
configobj                    5.0.6
constantly                   15.1.0
contourpy                    1.1.0
cryptography                 2.8
cupshelpers                  1.0
cycler                       0.11.0
Cython                       0.29.28
dash                         2.11.1
dash-core-components         2.0.0
dash-html-components         2.0.0
dash-table                   5.0.0
dbus-python                  1.2.16
debugpy                      1.6.7.post1
decorator                    5.1.1
deepdiff                     6.7.1
DeepXDE                      1.9.3
defer                        1.0.6
defusedxml                   0.7.1
deprecation                  2.1.0
dill                         0.3.6
distro                       1.4.0
distro-info                  0.23ubuntu1
dm-env                       1.6
dm-env-rpc                   1.1.6
dm-tree                      0.1.8
docker-pycreds               0.4.0
docopt                       0.6.2
entrypoints                  0.3
enum34                       1.1.10
exceptiongroup               1.1.3
executing                    1.2.0
Farama-Notifications         0.0.4
fasteners                    0.18
fastjsonschema               2.18.0
filelock                     3.12.3
fire                         0.4.0
Flask                        2.2.5
flatbuffers                  23.5.26
fonttools                    4.42.1
frozenlist                   1.4.0
fsspec                       2023.9.0
functorch                    2.0.0
fvcore                       0.1.5.post20221221
gast                         0.5.4
gitdb                        4.0.11
GitPython                    3.1.18
google-auth                  2.22.0
google-auth-oauthlib         1.0.0
google-pasta                 0.2.0
googleapis-common-protos     1.62.0
grpcio                       1.57.0
gym                          0.23.0
gym-notices                  0.0.8
gymnasium                    0.29.1
h11                          0.14.0
h5py                         3.9.0
httpcore                     0.18.0
httplib2                     0.14.0
httpx                        0.25.0
huggingface-hub              0.20.1
hydra-core                   1.3.2
hyperlink                    19.0.0
idna                         2.8
imageio                      2.23.0
immutabledict                4.1.0
importlib-metadata           6.8.0
importlib-resources          6.0.1
incremental                  16.10.1
iniconfig                    2.0.0
iopath                       0.1.10
ipykernel                    6.25.2
ipython                      8.12.2
ipython-genutils             0.2.0
ipywidgets                   8.1.1
isort                        5.13.2
itsdangerous                 2.1.2
jedi                         0.19.0
Jinja2                       3.1.2
jmespath                     1.0.1
joblib                       1.3.2
json5                        0.9.14
jsonpatch                    1.22
jsonpointer                  2.0
jsonschema                   4.19.1
jsonschema-specifications    2023.7.1
jupyter_client               8.3.1
jupyter_core                 5.3.1
jupyter-events               0.7.0
jupyter_packaging            0.12.3
jupyter_server               2.7.3
jupyter_server_fileid        0.9.0
jupyter_server_terminals     0.4.4
jupyter_server_ydoc          0.8.0
jupyter-ydoc                 0.2.5
jupyterlab                   3.6.6
jupyterlab-pygments          0.2.2
jupyterlab_server            2.25.0
jupyterlab-widgets           3.0.9
kaggle                       1.5.16
keras                        2.13.1
keyring                      18.0.1
kiwisolver                   1.4.5
language-selector            0.1
launchpadlib                 1.10.13
lazr.restfulclient           0.14.2
lazr.uri                     1.0.3
lazy_loader                  0.3
lazy-object-proxy            1.10.0
libclang                     16.0.6
librosa                      0.10.1
lit                          16.0.6
llvmlite                     0.41.1
luxai-s2                     3.0.1
macaroonbakery               1.3.1
Markdown                     3.4.4
MarkupSafe                   2.1.3
matplotlib                   3.7.2
matplotlib-inline            0.1.6
mccabe                       0.7.0
mistune                      2.0.3
mock                         5.1.0
more-itertools               4.2.0
mpi4py                       3.1.4
mpmath                       1.3.0
mpyq                         0.2.5
msgpack                      1.0.7
multidict                    6.0.4
nbclassic                    1.0.0
nbclient                     0.8.0
nbconvert                    7.8.0
nbformat                     5.9.2
nest-asyncio                 1.5.7
netCDF4                      1.6.4
netifaces                    0.10.4
networkx                     3.1
nmmo                         2.0.3
notebook                     6.4.12
notebook_shim                0.2.3
numba                        0.58.1
numcodecs                    0.11.0
numpoly                      1.2.11
numpy                        1.24.4
numpy-stl                    2.16.3
nvidia-cublas-cu11           11.10.3.66
nvidia-cuda-cupti-cu11       11.7.101
nvidia-cuda-nvrtc-cu11       11.7.99
nvidia-cuda-runtime-cu11     11.7.99
nvidia-cudnn-cu11            8.5.0.96
nvidia-cufft-cu11            10.9.0.58
nvidia-curand-cu11           10.2.10.91
nvidia-cusolver-cu11         11.4.0.1
nvidia-cusparse-cu11         11.7.4.91
nvidia-dali-cuda110          1.29.0
nvidia-modulus               0.2.1
nvidia-modulus.sym           1.1.0
nvidia-nccl-cu11             2.14.3
nvidia-nvtx-cu11             11.7.91
oauthlib                     3.1.0
omegaconf                    2.3.0
open3d                       0.13.0
opencv-python                4.5.5.64
opt-einsum                   3.3.0
ordered-set                  4.1.0
overrides                    7.4.0
packaging                    23.1
paddlepaddle-gpu             0.0.0.post117
pandas                       2.0.3
pandocfilters                1.5.0
parso                        0.8.3
pathtools                    0.1.2
pbr                          5.11.1
pettingzoo                   1.24.2
pexpect                      4.6.0
pickleshare                  0.7.5
Pillow                       9.3.0
Pint                         0.19.2
pip                          23.3.2
pipreqs                      0.4.11
pkgutil_resolve_name         1.3.10
platformdirs                 3.10.0
plotly                       5.15.0
pluggy                       1.3.0
pooch                        1.8.0
portalocker                  2.8.2
portpicker                   1.6.0
prometheus-client            0.17.1
promise                      2.3
prompt-toolkit               3.0.39
protobuf                     4.24.2
psutil                       5.9.3
ptyprocess                   0.7.0
pufferlib                    0.5.1
pure-eval                    0.2.2
py                           1.11.0
py-cpuinfo                   9.0.0
pyaml                        23.9.3
pyasn1                       0.4.2
pyasn1-modules               0.2.1
pycairo                      1.16.2
pycparser                    2.21
pycups                       1.9.73
pygame                       2.5.2
Pygments                     2.16.1
PyGObject                    3.36.0
PyHamcrest                   1.9.0
PyJWT                        1.7.1
pylint                       2.16.0
pymacaroons                  0.13.0
PyNaCl                       1.3.0
pyOpenSSL                    19.0.0
pyparsing                    3.0.9
pyRFC3339                    1.1
pyrsistent                   0.15.5
PySC2                        4.0.0
pysdf                        0.1.6
pyserial                     3.4
pytest                       7.4.1
pytest-benchmark             3.4.1
python-apt                   2.0.1+ubuntu0.20.4.1
python-dateutil              2.8.2
python-debian                0.1.36ubuntu1
python-json-logger           2.0.7
python-slugify               5.0.2
python-utils                 3.7.0
pytorch-ranger               0.1.1
pytorch3d                    0.3.0
pytz                         2023.3.post1
pyxdg                        0.26
PyYAML                       6.0.1
pyzmq                        25.1.1
referencing                  0.30.2
regex                        2023.12.25
requests                     2.31.0
requests-oauthlib            1.3.1
requests-toolbelt            0.10.1
requests-unixsocket          0.2.0
retrying                     1.3.4
rfc3339-validator            0.1.4
rfc3986-validator            0.1.1
rich                         10.16.2
rpds-py                      0.10.3
rsa                          4.9
ruamel.yaml                  0.17.32
ruamel.yaml.clib             0.2.7
s2clientprotocol             5.0.12.91115.0
s2protocol                   5.0.12.91115.0
s3fs                         2023.9.0
safetensors                  0.4.1
scikit-learn                 1.0.2
scikit-optimize              0.9.0
scipy                        1.10.1
screen-resolution-extra      0.0.0
seaborn                      0.13.0
SecretStorage                2.3.1
semver                       2.13.0
Send2Trash                   1.8.2
sentry-sdk                   1.39.1
service-identity             18.1.0
setproctitle                 1.3.3
setuptools                   68.1.2
shortuuid                    1.0.11
simplejson                   3.16.0
six                          1.14.0
sk-video                     1.1.10
smmap                        5.0.1
sniffio                      1.3.0
sos                          4.4
soundfile                    0.12.1
soupsieve                    2.5
soxr                         0.3.7
ssh-import-id                5.10
stack-data                   0.6.2
symengine                    0.10.0
sympy                        1.5.1
systemd-python               234
tabulate                     0.9.0
tenacity                     8.2.3
tensorboard                  2.14.0
tensorboard-data-server      0.7.1
tensorboard-plugin-wit       1.8.1
tensorflow                   2.13.1
tensorflow-estimator         2.13.0
tensorflow-hub               0.15.0
tensorflow-io                0.34.0
tensorflow-io-gcs-filesystem 0.34.0
termcolor                    2.3.0
terminado                    0.17.1
testresources                2.0.1
text-unidecode               1.3
threadpoolctl                3.2.0
tiktoken                     0.4.0
timm                         0.5.4
tinycss2                     1.2.1
tokenizers                   0.13.3
toml                         0.10.2
tomli                        2.0.1
tomlkit                      0.12.1
torch                        2.0.1
torch-optimizer              0.3.0
torchvision                  0.15.2
tornado                      6.3.3
tqdm                         4.66.1
traitlets                    5.9.0
transformers                 4.31.0
transforms3d                 0.3.1
triton                       2.0.0
Twisted                      19.2.0
txaio                        23.1.1
typing                       3.7.4.3
typing_extensions            4.7.1
tzdata                       2023.3
ubuntu-advantage-tools       8001
ufw                          0.36
unattended-upgrades          0.1
urllib3                      1.25.8
vec-noise                    1.1.4
vtk                          9.2.6
wadllib                      1.3.3
wandb                        0.13.7
wcwidth                      0.2.6
webencodings                 0.5.1
websocket-client             1.6.3
Werkzeug                     2.3.7
wheel                        0.41.2
widgetsnbextension           4.0.9
wrapt                        1.15.0
xarray                       2023.1.0
xkit                         0.0.0
y-py                         0.6.0
yacs                         0.1.8
yarg                         0.1.9
yarl                         1.9.2
ypy-websocket                0.8.4
zarr                         2.16.1
zipp                         3.16.2
zope.interface               4.7.1
cshbupt commented 7 months ago

Uninstall setuptools of version 68.1.2 and install setuptools of version 65.5.0 will allow you to install "pufferlib[nmmo,cleanrl]" completely.