<commit_before>.. _installation:

Installation
------------

The Diofant CAS can be installed on virtually any computer with Python
3.4 or above.  Diofant requires `setuptools`_.  You can install latest
release with pip::

    $ pip install --pre diofant

.. note::

    You could use `pyvenv`_ to create isolated Python environment first,
    instead of installing everything system-wide.

Source
======

If you are a developer or like to get the latest updates as they come, be
sure to install from git::

    $ git clone git://github.com/diofant/diofant.git
    $ cd diofant
    $ python setup.py develop

To update to the latest version, go into your repository and execute::

    $ git pull origin master

You can see old Diofant's history (from Hg and SVN repos) in the
branch sympy-svn-history.  To see this history as part of
master's, simply do::

    $ git fetch origin 'refs/replace/*:refs/replace/*'

Run Diofant
===========

After installation, it is best to verify that your freshly-installed Diofant
works.  To do this, start up the Python interpreter and import the
Diofant libraries::

    >>> from diofant import *

From here, execute some simple Diofant statements like the ones below::

    >>> x = Symbol('x')
    >>> limit(sin(x)/x, x, 0)<commit_msg>Suggest "pip install -e ." instead of "./setup.py develop"<commit_after>.. _installation:

Installation
------------

The Diofant CAS can be installed on virtually any computer with Python
3.4 or above.  Diofant requires `setuptools`_.  You can install latest
release with pip::

    $ pip install --pre diofant

.. note::

    You could use `pyvenv`_ to create isolated Python environment first,
    instead of installing everything system-wide.

Source
======

If you are a developer or like to get the latest updates as they come, be
sure to install from git::

    $ git clone git://github.com/diofant/diofant.git
    $ cd diofant
    $ pip install -e .

or to install also extra dependencies::

    $ pip install -e .[gmpy,plot]

To update to the latest version, go into your repository and execute::

    $ git pull origin master

You can see old Diofant's history (from Hg and SVN repos) in the
branch sympy-svn-history.  To see this history as part of
master's, simply do::

    $ git fetch origin 'refs/replace/*:refs/replace/*'

Run Diofant
===========

After installation, it is best to verify that your freshly-installed Diofant
works.  To do this, start up the Python interpreter and import the
Diofant libraries::

    >>> from diofant import *

From here, execute some simple Diofant statements like the ones below::

    >>> x = Symbol('x')
    >>> limit(sin(x)/x, x, 0)
{'fraction_non_alphanumeric': 0.09932279909706546, 'fraction_numerical': 0.002257336343115124, 'mean_word_length': 3.351882160392799, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4691530', 'n_tokens_mistral': 814, 'n_tokens_neox': 749, 'n_words': 354}