Skip to content

Pin Matplotlib < 3.1.1 to avoid mutiprocessing MacOS error #3912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
- Moved argument division out of `NegativeBinomial` `random` method. Fixes [#3864](https://github.com/pymc-devs/pymc3/issues/3864) in the style of [#3509](https://github.com/pymc-devs/pymc3/pull/3509).
- The Dirichlet distribution now raises a ValueError when it's initialized with <= 0 values (see [#3853](https://github.com/pymc-devs/pymc3/pull/3853)).
- End of sampling report now uses `arviz.InferenceData` internally and avoids storing
pointwise log likelihood (see [#3883](https://github.com/pymc-devs/pymc3/pull/3883))
pointwise log likelihood (see [#3883](https://github.com/pymc-devs/pymc3/pull/3883)).
- To avoid crashing multiprocessing on MacOS, matplotlib dependency is pinned to versions < 3.1.1 until [the issue](https://github.com/matplotlib/matplotlib/issues/15410) is resolved (see [#3849](https://github.com/pymc-devs/pymc3/issues/3849)).

## PyMC3 3.8 (November 29 2019)

Expand Down
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
arviz>=0.7.0
theano>=1.0.4
fastprogress>=0.2.0
h5py>=2.7.0
matplotlib==3.1.0
numpy>=1.13.0
scipy>=0.18.1
pandas>=0.18.0
patsy>=0.5.1
fastprogress>=0.2.0
h5py>=2.7.0
scipy>=0.18.1
theano>=1.0.4
typing-extensions>=3.7.4
contextvars; python_version < '3.7'
54 changes: 28 additions & 26 deletions scripts/create_testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,45 @@

set -ex # fail on first error, print commands

while test $# -gt 0
do
case "$1" in
--global)
GLOBAL=1
;;
--no-setup)
NO_SETUP=1
;;
esac
shift
while test $# -gt 0; do
case "$1" in
--global)
GLOBAL=1
;;
--no-setup)
NO_SETUP=1
;;
esac
shift
done

command -v conda >/dev/null 2>&1 || {
echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2;
exit 1;
echo "Requires conda but it is not installed. Run install_miniconda.sh." >&2
exit 1
}

ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6

if [ -z ${GLOBAL} ]
then
if conda env list | grep -q ${ENVNAME}
then
echo "Environment ${ENVNAME} already exists, keeping up to date"
else
conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION}
fi
source activate ${ENVNAME}
if [ -z ${GLOBAL} ]; then
if conda env list | grep -q ${ENVNAME}; then
echo "Environment ${ENVNAME} already exists, keeping up to date"
else
conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION}
fi
source activate ${ENVNAME}
fi
pip install --upgrade pip

conda install --yes mkl-service
conda install --yes -c conda-forge python-graphviz


# Install editable using the setup.py
# Uninstall the three matplotlibs present on conda env
pip uninstall matplotlib --yes
pip uninstall matplotlib --yes
pip uninstall matplotlib --yes
# Pin matplotlib until https://github.com/matplotlib/matplotlib/issues/15410 is resolved
pip install --force-reinstall "matplotlib==3.1.0"

# Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423
pip install --no-cache-dir --ignore-installed -e .
Expand All @@ -48,6 +49,7 @@ pip install --no-cache-dir --ignore-installed -r requirements-dev.txt
# Install untested, non-required code (linter fails without them)
pip install ipython ipywidgets

# Install editable using the setup.py
if [ -z ${NO_SETUP} ]; then
python setup.py build_ext --inplace
python setup.py build_ext --inplace
fi