Skip to content

Suggestion: update numpy version in ml-agents-envs/setup.py #6002

@xyz2022

Description

@xyz2022

Note: problem and solution contained within

context

Following this guide: https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md,
Which points to this repo: git clone --branch release_21 https://github.com/Unity-Technologies/ml-agents.git,
line 63 of file ml-agents/ml-agents-envs
/setup.py: "numpy==1.21.2"

problem

` Building wheel for numpy (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [214 lines of output]
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.`

So try numpy==1.22.1 and it installs fine but new error when its time to run mlagents-learn: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xe

Solution

Finally, pip install numpy==1.23.1 and everything works fine. No errors on install or on mlagents-learn

Conclusion:

For users installing the following this guide verbatim: https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md

The version of numpy in setup.py (in ml-agents-envs/setup.py and ml-agents/setup.py) should be changed to:
"numpy==1.23.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue describes a potential bug in ml-agents.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions