<commit_before>.. _install:

Installation
============

Installing/Upgrading From the PyPI
----------------------------------
::

    $ pip install -U textblob
    $ python -m textblob.download_corpora

This will install TextBlob and download the necessary NLTK corpora. If you need to change the default download directory set the ``NLTK_DATA`` environment variable.

.. admonition:: Downloading the minimum corpora

    If you only intend to use TextBlob's default models (no model overrides), you can pass the ``lite`` argument. This downloads only those corpora needed for basic functionality.
    ::

        $ python -m textblob.download_corpora lite

With conda
----------

.. note::
    Conda builds are currently available for Mac OSX only.

TextBlob is also available as a `conda <http://conda.pydata.org/>`_ package. To install with ``conda``, run ::


    $ conda install -c https://conda.anaconda.org/sloria textblob
    $ python -m textblob.download_corpora<commit_msg>DOC: update conda install instructions<commit_after>.. _install:

Installation
============

Installing/Upgrading From the PyPI
----------------------------------
::

    $ pip install -U textblob
    $ python -m textblob.download_corpora

This will install TextBlob and download the necessary NLTK corpora. If you need to change the default download directory set the ``NLTK_DATA`` environment variable.

.. admonition:: Downloading the minimum corpora

    If you only intend to use TextBlob's default models (no model overrides), you can pass the ``lite`` argument. This downloads only those corpora needed for basic functionality.
    ::

        $ python -m textblob.download_corpora lite

With conda
----------

TextBlob is also available as a `conda <http://conda.pydata.org/>`_ package. To install with ``conda``, run ::

    $ conda install -c conda-forge textblob
    $ python -m textblob.download_corpora
{'fraction_non_alphanumeric': 0.13119072708113805, 'fraction_numerical': 0.0, 'mean_word_length': 3.0663811563169165, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4285580', 'n_tokens_mistral': 528, 'n_tokens_neox': 500, 'n_words': 209}