MicroRTS-Py installation failing
Hi,
I've encountered an issue when trying to install MicroRTS-Py in the last few days.
When running poetry install, I get the following exception:
• Installing gym (0.21.0): Failed
CalledProcessError
Command '['/home/marcelo/.pyenv/versions/3.9.15/envs/microrts-py-test/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/home/marcelo/.pyenv/versions/3.9.15/envs/microrts-py-test', '--no-deps', '/home/marcelo/.cache/pypoetry/artifacts/a9/c8/ae/d0a65375458271c58575e7e37f2e1b64874bb89e5ff06ad8bfbd3a23ec/gym-0.21.0.tar.gz']' returned non-zero exit status 1.
at ~/.pyenv/versions/3.9.15/lib/python3.9/subprocess.py:528 in run
524│ # We don't call process.wait() as .__exit__ does that for us.
525│ raise
526│ retcode = process.poll()
527│ if check and retcode:
→ 528│ raise CalledProcessError(retcode, process.args,
529│ output=stdout, stderr=stderr)
530│ return CompletedProcess(process.args, retcode, stdout, stderr)
531│
532│
The following error occurred when trying to handle this error:
EnvCommandError
Command ['/home/marcelo/.pyenv/versions/3.9.15/envs/microrts-py-test/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/home/marcelo/.pyenv/versions/3.9.15/envs/microrts-py-test', '--no-deps', '/home/marcelo/.cache/pypoetry/artifacts/a9/c8/ae/d0a65375458271c58575e7e37f2e1b64874bb89e5ff06ad8bfbd3a23ec/gym-0.21.0.tar.gz'] errored with the following return code 1, and output:
Processing /home/marcelo/.cache/pypoetry/artifacts/a9/c8/ae/d0a65375458271c58575e7e37f2e1b64874bb89e5ff06ad8bfbd3a23ec/gym-0.21.0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/env.py:1476 in _run
1472│ output = subprocess.check_output(
1473│ command, stderr=subprocess.STDOUT, env=env, **kwargs
1474│ )
1475│ except CalledProcessError as e:
→ 1476│ raise EnvCommandError(e, input=input_)
1477│
1478│ return decode(output)
1479│
1480│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
The following error occurred when trying to handle this error:
PoetryException
Failed to install /home/marcelo/.cache/pypoetry/artifacts/a9/c8/ae/d0a65375458271c58575e7e37f2e1b64874bb89e5ff06ad8bfbd3a23ec/gym-0.21.0.tar.gz
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/pip.py:51 in pip_install
47│
48│ try:
49│ return environment.run_pip(*args)
50│ except EnvCommandError as e:
→ 51│ raise PoetryException(f"Failed to install {path.as_posix()}") from e
52│
Seems like it might be related to this other issue https://github.com/openai/gym/issues/3176 but I wasn't able to fix it.
Any ideas about what I can do to solve this problem?
@vwxyzjn Setuptools updated which broke gym v0.21, do you know if it is possible to change microRTS to specify the setuptools?
Was facing same issue, As a workaround pre installed gym 0.26.2 and updated pyproject.toml and poetry.lock. Would love to know if there is a fix available.
@rahuldwivedi1112 would you mind going into more detail on what you changed in pyproject.toml and poerty.lock to get the workaround to work? Thanks in advance
It’s probably related to setup tools. See https://github.com/vwxyzjn/invalid-action-masking/issues/9#issuecomment-1540183225
@rahuldwivedi1112 would you mind going into more detail on what you changed in pyproject.toml and poerty.lock to get the workaround to work? Thanks in advance
Seems like they pushed a fix. but this is what i did before
Poetry.lock Line 310 : gym = ">=0.21.0,<0.22.0" --> gym = ">=0.21.0,<0.27.0"
line 592: version = "0.21.0" ---> version = "0.26.2" Line 4651( may not need changing, if there is error then update the version to 26.2 and Sha256 string from the error message, i got this error when i used ) : {file = "gym-0.21.0.tar.gz", hash = "sha256:0fd1ce165c754b4017e37a617b097c032b8c3feb8a0394ccc8777c7c50dddff3"},
pyproject.toml: line 16: gym = "^0.21.0" ---> gym = "^0.26.2"
Be aware that there are significant API changes between 0.21 and 0.26, and will probably not work out of the box
Hi all could you give the latest master a try?
Good news, the hello_world.py works without any problems, when I try to train an agent with 'python ppo_gridnet.py' I get this error.
Try pulling the master branch. You might be running an earlier version of the master.
https://asciinema.org/a/586754 shows my installation end-to-end