Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

require Python 3.6.1 #1667

Merged
merged 5 commits into from Aug 27, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -19,7 +19,7 @@ A clear and concise description of what you expected to happen.

**System (please complete the following information):**
- OS: [e.g. OSX, Linux]
- Python version: [if it's not 3.6, that's probably your problem]
- Python version: [if it's not 3.6.1 or later, that's probably your problem]
- AllenNLP version: [e.g. v0.5.1, or "I installed from master"]
- PyTorch version: (if you installed it yourself)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -9,16 +9,16 @@ for developing state-of-the-art deep learning models on a wide variety of lingui

## Installation

The preferred way to install AllenNLP is via `pip`. Just run `pip install allennlp` in your Python 3.6 environment and you're good to go!
AllenNLP requires Python 3.6.1 or later. The preferred way to install AllenNLP is via `pip`. Just run `pip install allennlp` in your Python environment and you're good to go!

If you need pointers on setting up a Python 3.6 environment or would like to install AllenNLP using a different method, see below.
If you need pointers on setting up an appropriate Python environment or would like to install AllenNLP using a different method, see below.

### Installing via pip

#### Setting up a virtual environment

[Conda](https://conda.io/) can be used set up a virtual environment with the
version of Python required for AllenNLP. If you already have a Python 3.6
version of Python required for AllenNLP. If you already have a Python 3.6 or 3.7
environment you want to use, you can skip to the 'installing via pip' section.

1. [Download and install Conda](https://conda.io/docs/download.html).
Expand Down
7 changes: 4 additions & 3 deletions allennlp/__init__.py
@@ -1,9 +1,10 @@
# pylint: disable=wrong-import-position

# Make sure that allennlp is running in Python 3.6
# Make sure that allennlp is running on Python 3.6.1 or later
# (to avoid running into this bug: https://bugs.python.org/issue29246)
import sys
if sys.version_info < (3, 6):
raise RuntimeError("AllenNLP requires Python 3.6 or later")
if sys.version_info < (3, 6, 1):
raise RuntimeError("AllenNLP requires Python 3.6.1 or later")

# We get a lot of these spurious warnings,
# see https://github.com/ContinuumIO/anaconda-issues/issues/6678
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -134,5 +134,5 @@
setup_requires=setup_requirements,
tests_require=['pytest', 'flaky', 'responses>=0.7', 'jupyter'],
include_package_data=True,
python_requires='>=3.6',
python_requires='>=3.6.1',
zip_safe=False)