edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

Installation Help #21

Closed Quantemplation closed 2 years ago

Quantemplation commented 2 years ago

I am a complete novice to github and conda and I am having trouble installing (likely user error). Looking for specific help or general guidance on where to go for help. I am on Windows. Seems solving environment fails, maybe has to do with linux-64 line or prefix at bottom of .ym file being to an unkown directory. Thanks in advance for any advice.

Installed the full anaconda so I could use the Navigator Opened powershell prompt cd to the directory with the godot_rl_agents folder and enviroment.ym; ran "conda env create" output "Collecting package metadata (repodata.json): done Solving environment: failed

ResolvePackageNotFound:

edbeeching commented 2 years ago

Hi thanks for raising the issue. Sorry there is an issue with the Windows installation, please follow the instructions in this related GitHub issue: https://github.com/edbeeching/godot_rl_agents/issues/14#issuecomment-1105764165

Let me know if you encounter any other issues.

Quantemplation commented 2 years ago

Thank you! That solved it. Had to install Numpy separately after. Early on it gave me a warning telling me to manually delete a file in Conda and reboot. Then after doing so gave be this error indicating the file I deleted is corrupted.

CondaVerificationError: The package for pytorch located at E:\Dev\Conda\pkgs\pytorch-1.11.0-py3.9_cuda11.3_cudnn8_0

Guessing I should reinstall pytorch Using the installation commands seemed to still worked. Upon trying to run an example environment it can not seem to find the ray module.

(gdrl_conda) PS E:\Dev\ML> gdrl --env_path envs/builds/JumperHard/jumper_hard.x86_64 --config_file envs/configs/ppo_config_jumper_hard.yaml Traceback (most recent call last): File "E:\Dev\Conda\envs\gdrl_conda\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "E:\Dev\Conda\envs\gdrl_conda\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "E:\Dev\Conda\envs\gdrl_conda\Scripts\gdrl.exe__main__.py", line 4, in File "E:\Dev\Conda\envs\gdrl_conda\lib\site-packages\godot_rl_agents\core\main.py", line 25, in from godot_rl_agents.wrappers.ray_wrapper import rllib_training File "E:\Dev\Conda\envs\gdrl_conda\lib\site-packages\godot_rl_agents\wrappers\ray_wrapper.py", line 6, in from ray.rllib.env.vector_env import VectorEnv ModuleNotFoundError: No module named 'ray'

Once again your help was greatly appreciated. I will play around with reinstalling some files. Sorry for the trouble. I got a lot to figure out.

edbeeching commented 2 years ago

Hi, try pip install ray[rllib] with your conda environment activated, it may be worth removing and reinstall all the environment. Check out the conda cheatsheet for useful commands.

Don't forget to run with the Windows .exe: gdrl --env_path envs/builds/JumperHard/jumper_hard.exe --config_file envs/configs/ppo_config_jumper_hard.yaml

Quantemplation commented 2 years ago

Some reason pip was using python 3.1 without ray. I had to reinstall conda, to fix the problem I made, but finally got it to work. Thank you so much!