Skip to content

Commit e098482

Browse files
✏️ 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
1 parent 2824027 commit e098482

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

README.rst

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,25 @@ 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

@@ -101,29 +104,41 @@ The current development branch of PyMC3 can be installed from GitHub, also using
101104
pip install git+https://github.com/pymc-devs/pymc3
102105

103106
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:
107+
(recommended), see the Theano 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 Installation
113+
-------------------
114+
115+
PyMC3 is tested on Python 3.6, 3.7, and 3.8 and depends on `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__,
116+
NumPy, SciPy, and pandas
117+
(see `requirements.txt <https://github.com/pymc-devs/pymc3/blob/master/requirements.txt>`__ for version
118+
information).
119+
120+
That being said, you can install PyMC3 using the ``requirements.txt``
121+
file.
122+
123+
This requires cloning the repository to your computer:
106124

107125
::
108126

109127
git clone https://github.com/pymc-devs/pymc3
110128
cd pymc3
111129
pip install -r requirements.txt
112130

113-
However, if a recent version of Theano has already been installed on
114-
your system, you can install PyMC3 directly from GitHub.
131+
.. note::
132+
If you already have `Theano-PyMC <https://github.com/pymc-devs/Theano-PyMC>`__ installed, then re-install the module, as such
115133

116-
Another option is to clone the repository and install PyMC3 using
117-
``python setup.py install`` or ``python setup.py develop``.
134+
``conda remove theano-pymc -y``
118135

136+
``conda install -c conda-forge theano-pymc -y``
119137

120-
Dependencies
121-
============
138+
Arviz Installation
139+
------------------
122140

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).
141+
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``.
127142

128143
Optional
129144
--------

docs/source/index.rst

Lines changed: 0 additions & 7 deletions
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)