这是indexloc提供的服务,不要输入任何密码
Skip to content

Update Anaconda support #228

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

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
---

[![PyPI](https://img.shields.io/pypi/v/tianshou)](https://pypi.org/project/tianshou/)
[![Conda](https://img.shields.io/conda/vn/conda-forge/tianshou)](https://github.com/conda-forge/tianshou-feedstock)
[![Read the Docs](https://img.shields.io/readthedocs/tianshou)](https://tianshou.readthedocs.io/en/latest)
[![Read the Docs](https://img.shields.io/readthedocs/tianshou-docs-zh-cn?label=%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3)](https://tianshou.readthedocs.io/zh/latest/)
[![Unittest](https://github.com/thu-ml/tianshou/workflows/Unittest/badge.svg?branch=master)](https://github.com/thu-ml/tianshou/actions)
Expand All @@ -13,7 +14,7 @@
[![GitHub stars](https://img.shields.io/github/stars/thu-ml/tianshou)](https://github.com/thu-ml/tianshou/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/thu-ml/tianshou)](https://github.com/thu-ml/tianshou/network)
[![GitHub license](https://img.shields.io/github/license/thu-ml/tianshou)](https://github.com/thu-ml/tianshou/blob/master/LICENSE)
[![Join the chat at https://gitter.im/thu-ml/tianshou](https://badges.gitter.im/thu-ml/tianshou.svg)](https://gitter.im/thu-ml/tianshou?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Gitter](https://badges.gitter.im/thu-ml/tianshou.svg)](https://gitter.im/thu-ml/tianshou?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

**Tianshou** ([天授](https://baike.baidu.com/item/%E5%A4%A9%E6%8E%88)) is a reinforcement learning platform based on pure PyTorch. Unlike existing reinforcement learning libraries, which are mainly based on TensorFlow, have many nested classes, unfriendly API, or slow-speed, Tianshou provides a fast-speed modularized framework and pythonic API for building the deep reinforcement learning agent with the least number of lines of code. The supported interface algorithms currently include:

Expand Down Expand Up @@ -50,28 +51,24 @@ In Chinese, Tianshou means divinely ordained and is derived to the gift of being

## Installation

Tianshou is currently hosted on [PyPI](https://pypi.org/project/tianshou/). It requires Python >= 3.6. You can simply install Tianshou with the following command:
Tianshou is currently hosted on [PyPI](https://pypi.org/project/tianshou/) and [conda-forge](https://github.com/conda-forge/tianshou-feedstock). It requires Python >= 3.6.

You can simply install Tianshou from PyPI with the following command:

```bash
$ pip install tianshou
```

You can also install with the newest version through GitHub:
If you use Anaconda or Miniconda, you can install Tianshou from conda-forge through the following command:

```bash
# latest version
$ pip install git+https://github.com/thu-ml/tianshou.git@master
$ conda -c conda-forge install tianshou
```

If you use Anaconda or Miniconda, you can install Tianshou through the following command lines:
You can also install with the newest version through GitHub:

```bash
# create a new virtualenv and install pip, change the env name if you like
$ conda create -n myenv pip
# activate the environment
$ conda activate myenv
# install tianshou
$ pip install tianshou
$ pip install git+https://github.com/thu-ml/tianshou.git@master --upgrade
```

After installation, open your python console and type
Expand Down
18 changes: 7 additions & 11 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,25 @@ Here is Tianshou's other features:
Installation
------------

Tianshou is currently hosted on `PyPI <https://pypi.org/project/tianshou/>`_. You can simply install Tianshou with the following command (with Python >= 3.6):
Tianshou is currently hosted on `PyPI <https://pypi.org/project/tianshou/>`_ and `conda-forge <https://github.com/conda-forge/tianshou-feedstock>`_. It requires Python >= 3.6.

You can simply install Tianshou from PyPI with the following command:

.. code-block:: bash

$ pip install tianshou

You can also install with the newest version through GitHub:
If you use Anaconda or Miniconda, you can install Tianshou from conda-forge through the following command:

.. code-block:: bash

# latest version
$ pip install git+https://github.com/thu-ml/tianshou.git@master
$ conda -c conda-forge install tianshou

If you use Anaconda or Miniconda, you can install Tianshou through the following command lines:
You can also install with the newest version through GitHub:

.. code-block:: bash

# create a new virtualenv and install pip, change the env name if you like
$ conda create -n myenv pip
# activate the environment
$ conda activate myenv
# install tianshou
$ pip install tianshou
$ pip install git+https://github.com/thu-ml/tianshou.git@master --upgrade

After installation, open your python console and type
::
Expand Down