# Installation

As of version 2.0.0, PySAL supports python 3.6 and 3.7. Please make sure that you are operating in a python 3 environment.

## Installing with conda

To install PySAL and all its dependencies, we recommend using the conda package manager. This can be obtained by installing the Anaconda Distribution (a free Python distribution for data science), or through miniconda (minimal distribution only containing Python and the conda package manager).

Using conda, PySAL can be installed as follows:

    conda install --channel conda-forge pysal

## Installing with pip

PySAL is available on the Python Package Index. Therefore, you can either install directly with pip from the command line:

    pip install -U pysal

or download the source distribution (.tar.gz) and decompress it to your selected destination. Open a command shell and navigate to the decompressed folder. Type:

    pip install .

Warning

When installing with pip, you have to ensure that the required dependencies for PySAL are installed on your operating system. Details on how to install these packages can be found in Dependencies. Using conda (above) would avoid having to install the dependencies separately.

## Installing the development version

Potentially, you might want to use the newest features in the development version of PySAL on github - pysal/pysal while have not been incorporated in the Pypi released version. You can achieve that by installing pysal/pysal by running the following from a command shell:

    pip install git+https://github.com/pysal/pysal.git

You can also fork the pysal/pysal repo and create a local clone of your fork. By making changes to your local clone and submitting a pull request to pysal/PySAL, you can contribute to the PySAL development.

## Dependencies

### Required

- geopandas

- seaborn

- descartes

- palettable

- scikit-learn

- rtree

- tqdm

- statsmodels

- deprecated

### Optional

- urbanaccess

- pandana

- numba

- numexpr

- bokeh

## Installing versions supporting Python 2

Users requiring Python 2 support can install the legacy version of PySAL: 1.1.14 via pip:

    pip install pysal==1.14.4.post2

Note that this version is only receiving bug fixes. All new enhancements (post 2019-01) to PySAL are Python 3+ only, and are not available in 1.14.4.