google-research / football

Check out the new game server:
https://research-football.dev
Apache License 2.0
3.35k stars 1.29k forks source link

windows 10 can not run ‘python -m gfootball.examples.run_ppo2 --level=academy_empty_goal_close’ #323

Open fighting-zz opened 2 years ago

fighting-zz commented 2 years ago

`(football-env) C:\dev\football>python -m gfootball.examples.run_ppo2 --level=academy_empty_goal_close 2022-07-18 15:10:02.220384: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2022-07-18 15:10:02.221058: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "C:\dev\football\football-env\lib\site-packages\sonnet__init__.py", line 47, in _ensure_dependency_available_at_version pkg = importlib.import_module(package_name) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\dev\football\football-env\lib\site-packages\tensorflow_probability\init.py", line 75, in from tensorflow_probability.python import * # pylint: disable=wildcard-import File "C:\dev\football\football-env\lib\site-packages\tensorflow_probability\python\init.py", line 24, in from tensorflow_probability.python import experimental File "C:\dev\football\football-env\lib\site-packages\tensorflow_probability\python\experimental\init.py", line 34, in from tensorflow_probability.python.experimental import auto_batching File "C:\dev\football\football-env\lib\site-packages\tensorflow_probability\python\experimental\auto_batching\init.py", line 24, in from tensorflow_probability.python.experimental.auto_batching import frontend File "C:\dev\football\football-env\lib\site-packages\tensorflow_probability\python\experimental\auto_batching\frontend.py", line 44, in from tensorflow.python.autograph.core import naming ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' (C:\dev\football\football-env\lib\site-packages\tensorflow\python\autograph\core\init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\dev\football\gfootball\examples\run_ppo2.py", line 29, in from gfootball.examples import models File "C:\dev\football\gfootball\examples\models.py", line 23, in import sonnet as snt File "C:\dev\football\football-env\lib\site-packages\sonnet__init.py", line 64, in _ensure_dependency_available_at_version('tensorflow_probability', '0.4.0') File "C:\dev\football\football-env\lib\site-packages\sonnet\init__.py", line 50, in _ensure_dependency_available_at_version raise SystemError( SystemError: Sonnet requires tensorflow_probability (minimum version 0.4.0) to be installed. If using pip, run pip install tensorflow-probability or `pip install tensorflow-probability-gpu``

python==3.10.5

fighting-zz commented 2 years ago

(football-env) C:\dev\football>pip list Package Version


absl-py 1.1.0 astunparse 1.6.3 baselines 0.1.5 build 0.8.0 cachetools 5.2.0 certifi 2022.6.15 charset-normalizer 2.1.0 click 8.1.3 cloudpickle 1.1.1 colorama 0.4.5 contextlib2 21.6.0 decorator 5.1.1 dill 0.3.5.1 dm-sonnet 1.36 dm-tree 0.1.7 flatbuffers 1.12 future 0.18.2 gast 0.2.2 gfootball 2.10.3 google-auth 2.9.1 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.47.0 gym 0.12.1 gym-notices 0.0.7 h5py 3.7.0 idna 3.3 joblib 1.1.0 keras 2.9.0 Keras-Preprocessing 1.1.2 libclang 14.0.1 Markdown 3.4.1 numpy 1.23.1 oauthlib 3.2.0 opencv-python 4.6.0.66 opt-einsum 3.3.0 packaging 21.3 pep517 0.12.0 pip 22.1.2 progressbar2 4.0.0 protobuf 3.19.4 psutil 5.9.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pygame 2.1.2 pyglet 1.3.2 pyparsing 3.0.9 python-utils 3.3.3 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.8 scipy 1.8.1 semantic-version 2.10.0 setuptools 63.2.0 six 1.16.0 tensorboard 2.9.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow 2.9.1 tensorflow-estimator 2.9.0 tensorflow-io-gcs-filesystem 0.26.0 tensorflow-probability 0.8.0 termcolor 1.1.0 tomli 2.0.1 tqdm 4.64.0 typing_extensions 4.3.0 urllib3 1.26.10 Werkzeug 2.1.2 wheel 0.37.1 wrapt 1.14.1

fighting-zz commented 2 years ago

(football-env) C:\dev\football>python -m pip install git+https://github.com/openai/baselines.git@tf2 . Collecting git+https://github.com/openai/baselines.git@tf2 Cloning https://github.com/openai/baselines.git (to revision tf2) to c:\users\user\appdata\local\temp\pip-req-build-ba2ckaig Running command git clone --filter=blob:none --quiet https://github.com/openai/baselines.git 'C:\Users\user\AppData\Local\Temp\pip-req-build-ba2ckaig' Running command git checkout -b tf2 --track origin/tf2 branch 'tf2' set up to track 'origin/tf2'. Switched to a new branch 'tf2' Resolved https://github.com/openai/baselines.git to commit b99a73afe37206775ac8b884d32a36e213a3fac2 Preparing metadata (setup.py) ... done Processing c:\dev\football Preparing metadata (setup.py) ... done Requirement already satisfied: gym<0.14 in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (0.12.1) Requirement already satisfied: scipy in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (1.8.1) Requirement already satisfied: tqdm in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (4.64.0) Requirement already satisfied: joblib in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (1.1.0) Requirement already satisfied: dill in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (0.3.5.1) Requirement already satisfied: progressbar2 in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (4.0.0) Requirement already satisfied: cloudpickle in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (1.1.1) Requirement already satisfied: click in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (8.1.3) Requirement already satisfied: opencv-python in c:\dev\football\football-env\lib\site-packages (from baselines==0.1.5) (4.6.0.66) Requirement already satisfied: pygame>=1.9.6 in c:\dev\football\football-env\lib\site-packages (from gfootball==2.10.3) (2.1.2) Requirement already satisfied: psutil in c:\dev\football\football-env\lib\site-packages (from gfootball==2.10.3) (5.9.1) Requirement already satisfied: numpy in c:\dev\football\football-env\lib\site-packages (from gfootball==2.10.3) (1.23.1) Requirement already satisfied: absl-py in c:\dev\football\football-env\lib\site-packages (from gfootball==2.10.3) (1.1.0) Requirement already satisfied: wheel in c:\dev\football\football-env\lib\site-packages (from gfootball==2.10.3) (0.37.1) Requirement already satisfied: pyglet>=1.2.0 in c:\dev\football\football-env\lib\site-packages (from gym<0.14->baselines==0.1.5) (1.3.2) Requirement already satisfied: six in c:\dev\football\football-env\lib\site-packages (from gym<0.14->baselines==0.1.5) (1.16.0) Requirement already satisfied: requests>=2.0 in c:\dev\football\football-env\lib\site-packages (from gym<0.14->baselines==0.1.5) (2.28.1) Requirement already satisfied: colorama in c:\dev\football\football-env\lib\site-packages (from click->baselines==0.1.5) (0.4.5) Requirement already satisfied: python-utils>=3.0.0 in c:\dev\football\football-env\lib\site-packages (from progressbar2->baselines==0.1.5) (3.3.3) Requirement already satisfied: future in c:\dev\football\football-env\lib\site-packages (from pyglet>=1.2.0->gym<0.14->baselines==0.1.5) (0.18.2) Requirement already satisfied: idna<4,>=2.5 in c:\dev\football\football-env\lib\site-packages (from requests>=2.0->gym<0.14->baselines==0.1.5) (3.3) Requirement already satisfied: charset-normalizer<3,>=2 in c:\dev\football\football-env\lib\site-packages (from requests>=2.0->gym<0.14->baselines==0.1.5) (2.1.0) Requirement already satisfied: certifi>=2017.4.17 in c:\dev\football\football-env\lib\site-packages (from requests>=2.0->gym<0.14->baselines==0.1.5) (2022.6.15) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\dev\football\football-env\lib\site-packages (from requests>=2.0->gym<0.14->baselines==0.1.5) (1.26.10) Building wheels for collected packages: gfootball Building wheel for gfootball (setup.py) ... done Created wheel for gfootball: filename=gfootball-2.10.3-cp310-cp310-win_amd64.whl size=13426181 sha256=583536716ddd34a13a2c050c70f3c74e15be97d378a6837ceab67eea4a61bc4e Stored in directory: C:\Users\user\AppData\Local\Temp\pip-ephem-wheel-cache-6kr9u7y4\wheels\12\f1\e5\9284ed10e19bd68dcfbdb80b46c89cc6f4fdc3e971845cdeb1 Successfully built gfootball Installing collected packages: gfootball Attempting uninstall: gfootball Found existing installation: gfootball 2.10.3 Uninstalling gfootball-2.10.3: Successfully uninstalled gfootball-2.10.3 Successfully installed gfootball-2.10.3