Search code examples
pythonunity-game-engineml-agent

pip3 install mlagents causing error because of h5py>=2.9.0


I'm trying to install this package to use it with unity

mlagents 0.29.0 https://pypi.org/project/mlagents/

pip3 install mlagents

Note: i have a mac

I'm getting this error

ERROR: Some build dependencies for h5py>=2.9.0 from https://files.pythonhosted.org/packages/56/c7/9410b3802f456c702f6e0ccebf82e628f42a30921f61a232e26e424d95d4/h5py-3.5.0.tar.gz (from mlagents) conflict with the backend dependencies: numpy==1.22.3 is incompatible with numpy ==1.19.3; python_version>='3.9'.

I also tried this command pip3 install mlagents --use-feature=2020-resolver

didn't work


Solution

  • I fixed the problem by running this command

    pip3.8 install mlagents

    pip3.8 not pip3