Skip to content

Commit aabec02

Browse files
Docs - Update PyMC3 Installation focus via Conda Forge (#4401)
* ✏️ Update PyMC3 Docs installation by Conda Forge ✏️ Update README.rst Add note about pip installation Co-authored-by: Thomas Wiecki <[email protected]> Update README.rst Add context to pip installation and dependencies Co-authored-by: Thomas Wiecki <[email protected]> Apply suggestions from code review Co-authored-by: Thomas Wiecki <[email protected]> ✏️ README installation update * Update README.rst * ✏️ Focus on Theano-PyMC3 instead of Theano for installation * Update README.rst * Update README.rst Co-authored-by: Thomas Wiecki <[email protected]>
1 parent 982bb4d commit aabec02

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

README.rst

+42-21
Original file line numberDiff line numberDiff line change
@@ -77,53 +77,74 @@ and as part of `PyMCon 2020 <https://discourse.pymc.io/c/pymcon/2020talks/15>`__
7777
Installation
7878
============
7979

80-
The latest release of PyMC3 can be installed from PyPI using ``pip``:
80+
PyMC3 Installation
81+
------------------
8182

82-
::
83+
The latest release of PyMC3 can be installed from Conda Forge (conda-forge):
8384

84-
pip install pymc3
85+
::
8586

86-
**Note:** Running ``pip install pymc`` will install PyMC 2.3, not PyMC3,
87-
from PyPI.
87+
conda install -c conda-forge pymc3
8888

89-
Or via conda-forge:
89+
While strongly discouraged due to installation problems you could try to install PyMC3 and its dependencies via PyPI using ``pip``:
9090

9191
::
9292

93-
conda install -c conda-forge pymc3
93+
pip install pymc3
9494

95-
Plotting is done using `ArviZ <https://arviz-devs.github.io/arviz/>`__ - if you follow the installation instructions above, then it will be installed alongside ``PyMC3``.
95+
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.
96+
.. note::
97+
98+
Running ``pip install pymc`` will install PyMC 2.3, not PyMC3, from PyPI.
9699

97100
The current development branch of PyMC3 can be installed from GitHub, also using ``pip``:
98101

99102
::
100103

101104
pip install git+https://github.com/pymc-devs/pymc3
102105

103-
To ensure the development branch of Theano is installed alongside PyMC3
104-
(recommended), you can install PyMC3 using the ``requirements.txt``
105-
file. This requires cloning the repository to your computer:
106+
Make sure to install the `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__ version that is pegged in ``PyMC3``'s ``requirements.txt``.
107+
For more information, see the `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__ Installation section, below.
108+
109+
Lastly, another option is to clone the repository and install PyMC3 using
110+
``python setup.py install`` or ``python setup.py develop``.
111+
112+
Theano-PyMC Installation
113+
------------------------
114+
115+
PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on NumPy, SciPy, and pandas
116+
(see `requirements.txt <https://github.com/pymc-devs/pymc3/blob/master/requirements.txt>`__ for version
117+
information).
118+
119+
Moreover, as of Late 2020, PyMC3 now requires `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__ instead of `Theano <https://github.com/Theano/Theano>`__.
120+
121+
That being said, you can install PyMC3 using the ``requirements.txt``
122+
file.
123+
124+
This requires cloning the repository to your computer:
106125

107126
::
108127

109128
git clone https://github.com/pymc-devs/pymc3
110129
cd pymc3
111130
pip install -r requirements.txt
112131

113-
However, if a recent version of Theano has already been installed on
114-
your system, you can install PyMC3 directly from GitHub.
132+
.. note::
115133

116-
Another option is to clone the repository and install PyMC3 using
117-
``python setup.py install`` or ``python setup.py develop``.
134+
* If you have Theano installed, please remove it and install Theano-PyMC via Conda Forge, seen below:
118135

136+
``conda remove theano``
119137

120-
Dependencies
121-
============
138+
* If you have an outdated version of Theano-PyMC, then re-install the module via Conda Forge:
122139

123-
PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__,
124-
NumPy, SciPy, and pandas
125-
(see `requirements.txt <https://github.com/pymc-devs/pymc3/blob/master/requirements.txt>`__ for version
126-
information).
140+
``conda remove theano-pymc -y``
141+
142+
``conda install -c conda-forge theano-pymc -y``
143+
144+
Arviz Installation
145+
------------------
146+
147+
Plotting is done using `ArviZ <https://arviz-devs.github.io/arviz/>`__ - if you follow the installation instructions above, then it will be installed alongside ``PyMC3``.
127148

128149
Optional
129150
--------

docs/source/index.rst

-7
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@
5454
5555
conda install -c conda-forge pymc3
5656
57-
.. raw:: html
58-
59-
<h3 class="ui header">Via pypi:</h3>
60-
61-
.. code-block:: bash
62-
63-
pip install pymc3
6457
6558
.. raw:: html
6659

0 commit comments

Comments
 (0)