-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release-21-branch numpy can't install successful. #6047
Comments
Hey, I've been having the same issue as you so I tried changing the numpy version in the file like you showed and it allowed me to install the packages but now I get another error and I was wondering if you were getting it too. I get an error that says: |
Maybe you come cross this problem and try:https://stackoverflow.com/questions/71986643/userwarning-failed-to-initialize-numpy-module-compiled-against-api-version-0xf |
General flow:
|
I change numpy version to 1.22.4 because it support python3.10.12 |
I followed those steps but met with many issues with the numpy version. I ended up finding the right solution for me, and it was to change the numpy verison in the Thanks for the help, though! |
I had faced a similar issue. It seemed to be caused by an incorrect numpy version. I removed the existing numpy and mlagents packages from the virtual env and reinstalled everything by using the setup.py from a branch release. |
I had this issue as well and fixed it by following @ashwinsnambiar recommendation of following @onurkurum #6008 (comment) "Workaround: in the file path-to-ml-agents\ml-agents-envs\setup.py" |
I ended up fixing all the issues, here is a document about how I fixed everything |
Very detailed teaching, thank you!! |
NP! |
I do the same but face this problem TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' note: This error originates from a subprocess, and is likely not a problem with pip. |
You might need to also change the Python version in the other setup file |
Very thanks for reply! But when I change the setup.py both in ml-agents and ml-agents-envs, I will face another bugERROR: Cannot install mlagents and mlagents==1.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
mlagents 1.0.0 depends on numpy>=1.23.3
mlagents-envs 1.0.0 depends on numpy==1.21.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2024年3月7日(星期四) 下午3:22
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [Unity-Technologies/ml-agents] release-21-branch numpy can't install successful. (Issue #6047)
I do the same but face this problem
TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
You might need to also change the Python version in the other setup file
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
anaconda navigator mlagents env setup.py- mlagents setup.py- python -m pip install ./ml-agents-envs ERROR: Cannot install mlagents, mlagents-envs==1.0.0 and mlagents==1.0.0 because these package versions have conflicting dependencies. The conflict is caused by: To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts |
it broke there for me |
Hi Guys, having an issue with this as well. Been trying to install it for class. We're required to use Python 3.10.11, and I changed the setup.py to use numpy 1.23.1 (version teacher said we gotta use), however, no matter what I do, when I run python -m pip install mlagents==1.0.0 in the console, it always installs numpy 1.21.2, I'll post the setup files and command below: Console:(mlagents) D:\UnityHiren\MLAgents\ml-agents>python -m pip install mlagents==1.0.0 × Building wheel for numpy (pyproject.toml) did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. ml-agents setup.py:import os from setuptools import setup, find_packages VERSION = mlagents.trainers.version here = os.path.abspath(os.path.dirname(file)) class VerifyVersionCommand(install):
Get the long description from the README filewith open(os.path.join(here, "README.md"), encoding="utf-8") as f: setup( ml-agents-envs setup.py:import os VERSION = mlagents_envs.version here = os.path.abspath(os.path.dirname(file)) class VerifyVersionCommand(install):
Get the long description from the README filewith open(os.path.join(here, "README.md"), encoding="utf-8") as f: setup( If you guys have any tips for fixing this, please tell me, been at it for 3 weeks, but I can't get my head around what's happening, I've reinstalled countless times, and deleted PIP Cache to prevent this (since before it used the cached numpy 1.21 as well) Thank you in advance for your help |
Installing mlagents from pip seems to be broken because of the numpy dependancy issues. I had faced the same problem earlier. Once you have updated the setup.py files, instead of installing it using pip, you have to install it from the cloned mlagents repo. Please read the section "Install the mlagents Python package" from the documentation https://unity-technologies.github.io/ml-agents/Installation/. If its still not clear, check the pdf. @ICOnce has documented it well step wise. https://github.com/Unity-Technologies/ml-agents/issues/6047#issuecomment-1943131006
|
…indows Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
…indows Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
…indows Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
…indows Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
…indows Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
…indows (#6082) Fixes #6047 Fixes the following errors when installing ml-agents-envs on windows if numpy 1.21.2 is already installed: ``` 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 ╰─> [326 lines of output] setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10. warnings.warn( Running from numpy source directory. ```
When you install mlagent-env using python virtual environment according to the install instruction document, you will encounter numpy can't install, This is because python 3.10.12 does not support the numpy version of setup.py in the ml-agents-envs folder, so setup.py needs to be changed
Can run
The text was updated successfully, but these errors were encountered: