From e09848226e8e6908da6fa9269650e36bd46de43f Mon Sep 17 00:00:00 2001 From: CloudChaoszero Date: Sun, 3 Jan 2021 03:03:11 -0800 Subject: [PATCH 1/5] :pencil2: Update PyMC3 Docs installation by Conda Forge :pencil2: Update README.rst Add note about pip installation Co-authored-by: Thomas Wiecki Update README.rst Add context to pip installation and dependencies Co-authored-by: Thomas Wiecki Apply suggestions from code review Co-authored-by: Thomas Wiecki :pencil2: README installation update --- README.rst | 55 +++++++++++++++++++++++++++---------------- docs/source/index.rst | 7 ------ 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/README.rst b/README.rst index 1ed5f656b6..80b31e7ce0 100644 --- a/README.rst +++ b/README.rst @@ -77,22 +77,25 @@ and as part of `PyMCon 2020 `__ Installation ============ -The latest release of PyMC3 can be installed from PyPI using ``pip``: +PyMC3 Installation +------------------ -:: +The latest release of PyMC3 can be installed from Conda Forge (conda-forge): - pip install pymc3 +:: -**Note:** Running ``pip install pymc`` will install PyMC 2.3, not PyMC3, -from PyPI. + conda install -c conda-forge pymc3 -Or via conda-forge: +While strongly discouraged due to installation problems you could try to install PyMC3 and its dependencies via PyPI using ``pip``: :: - conda install -c conda-forge pymc3 + pip install pymc3 -Plotting is done using `ArviZ `__ - if you follow the installation instructions above, then it will be installed alongside ``PyMC3``. +The reason installation via PyPI is difficult, especially on Windows and OSX, is that `Theano` requires compilation against MKL, which is difficult to set up, while Conda comes with its own compilers and MKL installation. +.. note:: + + Running ``pip install pymc`` will install PyMC 2.3, not PyMC3, from PyPI. The current development branch of PyMC3 can be installed from GitHub, also using ``pip``: @@ -101,8 +104,23 @@ The current development branch of PyMC3 can be installed from GitHub, also using pip install git+https://github.com/pymc-devs/pymc3 To ensure the development branch of Theano is installed alongside PyMC3 -(recommended), you can install PyMC3 using the ``requirements.txt`` -file. This requires cloning the repository to your computer: +(recommended), see the Theano Installation section, below. + +Lastly, another option is to clone the repository and install PyMC3 using +``python setup.py install`` or ``python setup.py develop``. + +Theano Installation +------------------- + +PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC `__, +NumPy, SciPy, and pandas +(see `requirements.txt `__ for version +information). + +That being said, you can install PyMC3 using the ``requirements.txt`` +file. + +This requires cloning the repository to your computer: :: @@ -110,20 +128,17 @@ file. This requires cloning the repository to your computer: cd pymc3 pip install -r requirements.txt -However, if a recent version of Theano has already been installed on -your system, you can install PyMC3 directly from GitHub. +.. note:: + If you already have `Theano-PyMC `__ installed, then re-install the module, as such -Another option is to clone the repository and install PyMC3 using -``python setup.py install`` or ``python setup.py develop``. + ``conda remove theano-pymc -y`` + ``conda install -c conda-forge theano-pymc -y`` -Dependencies -============ +Arviz Installation +------------------ -PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC `__, -NumPy, SciPy, and pandas -(see `requirements.txt `__ for version -information). +Plotting is done using `ArviZ `__ - if you follow the installation instructions above, then it will be installed alongside ``PyMC3``. Optional -------- diff --git a/docs/source/index.rst b/docs/source/index.rst index a79fea8854..053e1962f1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -54,13 +54,6 @@ conda install -c conda-forge pymc3 -.. raw:: html - -

Via pypi:

- -.. code-block:: bash - - pip install pymc3 .. raw:: html From 361e1b08217285bd852a36e1159c716181c6a17b Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Mon, 4 Jan 2021 10:15:22 +0100 Subject: [PATCH 2/5] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 80b31e7ce0..04ed1947b0 100644 --- a/README.rst +++ b/README.rst @@ -92,7 +92,7 @@ While strongly discouraged due to installation problems you could try to install pip install pymc3 -The reason installation via PyPI is difficult, especially on Windows and OSX, is that `Theano` requires compilation against MKL, which is difficult to set up, while Conda comes with its own compilers and MKL installation. +The reason installation via PyPI is difficult, especially on Windows and OSX, is that ``Theano`` requires compilation against MKL, which is difficult to set up, while Conda comes with its own compilers and MKL installation. .. note:: Running ``pip install pymc`` will install PyMC 2.3, not PyMC3, from PyPI. From ff9dea8a885c4d64d91c89f597df2b0bfe1e995d Mon Sep 17 00:00:00 2001 From: CloudChaoszero Date: Mon, 4 Jan 2021 01:53:03 -0800 Subject: [PATCH 3/5] :pencil2: Focus on Theano-PyMC3 instead of Theano for installation --- README.rst | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 04ed1947b0..bbe55483ba 100644 --- a/README.rst +++ b/README.rst @@ -103,20 +103,21 @@ The current development branch of PyMC3 can be installed from GitHub, also using pip install git+https://github.com/pymc-devs/pymc3 -To ensure the development branch of Theano is installed alongside PyMC3 -(recommended), see the Theano Installation section, below. +To ensure the development branch of `Theano-PyMC `__ is installed alongside PyMC3 +(recommended), see the `Theano-PyMC `__ Installation section, below. Lastly, another option is to clone the repository and install PyMC3 using ``python setup.py install`` or ``python setup.py develop``. -Theano Installation -------------------- +Theano-PyMC Installation +------------------------ -PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC `__, -NumPy, SciPy, and pandas +PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on NumPy, SciPy, and pandas (see `requirements.txt `__ for version information). +Moreover, as of Late 2020, PyMC3 now requires `Theano-PyMC `__ instead of `Theano `__. + That being said, you can install PyMC3 using the ``requirements.txt`` file. @@ -129,7 +130,12 @@ This requires cloning the repository to your computer: pip install -r requirements.txt .. note:: - If you already have `Theano-PyMC `__ installed, then re-install the module, as such + + * If you have Theano installed, please remove it and install Theano-PyMC via Conda Forge, seen below: + + ``conda remove theano`` + + * If you have an outdated version of Theano-PyMC, then re-install the module via Conda Forge: ``conda remove theano-pymc -y`` From 3f94ed98fd56a9572372df95d6509972912c84a3 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Tue, 5 Jan 2021 10:42:15 +0100 Subject: [PATCH 4/5] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index bbe55483ba..36183af144 100644 --- a/README.rst +++ b/README.rst @@ -103,7 +103,7 @@ The current development branch of PyMC3 can be installed from GitHub, also using pip install git+https://github.com/pymc-devs/pymc3 -To ensure the development branch of `Theano-PyMC `__ is installed alongside PyMC3 +Make sure to install the `Theano-PyMC `__ version that is pegged in ``PyMC3``'s ``requirements.txt``. (recommended), see the `Theano-PyMC `__ Installation section, below. Lastly, another option is to clone the repository and install PyMC3 using From 1d6fba2b2e3ad34e2c589d0bec7c35e86761ce5e Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Tue, 5 Jan 2021 10:42:54 +0100 Subject: [PATCH 5/5] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 36183af144..493134e7f7 100644 --- a/README.rst +++ b/README.rst @@ -104,7 +104,7 @@ The current development branch of PyMC3 can be installed from GitHub, also using pip install git+https://github.com/pymc-devs/pymc3 Make sure to install the `Theano-PyMC `__ version that is pegged in ``PyMC3``'s ``requirements.txt``. -(recommended), see the `Theano-PyMC `__ Installation section, below. +For more information, see the `Theano-PyMC `__ Installation section, below. Lastly, another option is to clone the repository and install PyMC3 using ``python setup.py install`` or ``python setup.py develop``.