hill-a / stable-baselines

A fork of OpenAI Baselines, implementations of reinforcement learning algorithms
http://stable-baselines.readthedocs.io/
MIT License
4.14k stars 723 forks source link

Installation Error: Stable_baselines #1124

Closed JingZhang918 closed 3 years ago

JingZhang918 commented 3 years ago

Hey guys! Basically I was just trying to install stable_baselines on Mac m1

Here is the code:

pip install stable-baselines

stable_baselines_error.txt

I got nothing. Please help me!!!!!

Miffyli commented 3 years ago

Looks like either Numpy or OpenCV could not be installed. I would recommend checking their communities for help on this.

PS: stable-baselines3 is more actively maintained, so you might want to try if it works :)

JingZhang918 commented 3 years ago

Looks like either Numpy or OpenCV could not be installed. I would recommend checking their communities for help on this.

PS: stable-baselines3 is more actively maintained, so you might want to try if it works :)

Thank You for your advice. I did try stable-baselines3 then I got:

stable_baselines3_error.txt

Then back to stable_baselines, I thought I should fix the opencv problem first, so I try to install OpenCV, then I got:

opencv_error.txt

I think there is a link.

Miffyli commented 3 years ago

Yeah indeed these are numpy and OpenCV errors. Looks like the older versions of these libraries do not work.

Try installing stable-baselines3 with only pip install stable-baselines3 (without the [extra]). That skips OpenCV installation but it is only used for some rendering purposes (visualizing envs etc).

JingZhang918 commented 3 years ago

pip_install_stable-baselines3.txt

I used pip install stable-baselines3 still got error. This sucks :(

Miffyli commented 3 years ago

I just realized we had same problem here: https://github.com/DLR-RM/stable-baselines3/issues/360

Try using conda to install libraries instead of pip.

JingZhang918 commented 3 years ago

Last login: Mon Jun 21 10:24:42 on ttys001 (base) zhangjing@zhangjingdeMacBook-Pro ~ % conda activate tf_m1 (tf_m1) zhangjing@zhangjingdeMacBook-Pro ~ % conda install -c conda-forge stable-baselines3 -y

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

(tf_m1) zhangjing@zhangjingdeMacBook-Pro ~ % conda install stable-baselines

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - stable-baselines

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

(tf_m1) zhangjing@zhangjingdeMacBook-Pro ~ % conda install stable-baselines3

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Still nothing 0.0

Miffyli commented 3 years ago

stable-baselines is not in conda repositories... Please look at the link I gave you.

I am not able to give further technical support on this as the issue lies in the dependencies of stable-baselines, not the stable-baselines itself, and close this issue as "no tech support".