Skip to content

Commit

Permalink
Enable one-line installation via pip (#5)
Browse files Browse the repository at this point in the history
* Move package requirements in setup.py for ease of installation

* s/minatar_environment/minatar/, move environments into main package

This is done to enable using `pip install -e .`, and to follow standard
packaging rules.

See:
pypa/pip#3160
pypa/setuptools#230

* Update installation instructions in README.md

* setup uses setuptools rather than disutils
  • Loading branch information
edran authored and kenjyoung committed Apr 8, 2019
1 parent ce4706e commit bf2a859
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 29 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,24 @@ To use MinAtar, you need python3 installed, make sure pip is also up to date. T
```bash
git clone https://github.com/kenjyoung/MinAtar.git
```
If you prefer running MinAtar in a virtualenv, you can do the following before steps 2 and 3:
If you prefer running MinAtar in a virtualenv, you can do the following before step 2:
```bash
python3 -m venv venv
source venv/bin/activate
# Upgrade Pip
pip install --upgrade pip
```

2. Install all dependencies and requirements:
2. Install MinAtar:
```bash
pip install -r requirements.txt
pip install .
```

3. Install MinAtar:
If you have any issues with automatic dependency installation, you can instead install the nessesary dependencies manually and run
```bash
python setup.py install
pip install . --no-deps
```

To verify whether if the installation is successful, run
To verify the installation is successful, run
```bash
python examples/random_play.py -g breakout
```
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

34 changes: 24 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
from distutils.core import setup
from setuptools import setup

setup(name='MinAtar',
version='1.0.2',
description='A miniaturized version of the arcade learning environment.',
url='https://github.com/kenjyoung/MinAtar',
author='Kenny Young',
author_email='[email protected]',
license='GPL',
packages=['minatar', 'minatar.environments'],
package_dir={'minatar': 'minatar_environment', 'minatar.environments':'environments'})
setup(
name='MinAtar',
version='1.0.3',
description='A miniaturized version of the arcade learning environment.',
url='https://github.com/kenjyoung/MinAtar',
author='Kenny Young',
author_email='[email protected]',
license='GPL',
packages=['minatar', 'minatar.environments'],
install_requires=[
'cycler>=0.10.0',
'kiwisolver>=1.0.1',
'matplotlib>=3.0.3',
'numpy>=1.16.2',
'pandas>=0.24.2',
'pyparsing>=2.3.1',
'python-dateutil>=2.8.0',
'pytz>=2018.9',
'scipy>=1.2.1',
'seaborn>=0.9.0',
'six>=1.12.0',
'torch>=1.0.0',
])

0 comments on commit bf2a859

Please sign in to comment.