pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

open blas on conda #154

Closed PetitLepton closed 7 years ago

PetitLepton commented 7 years ago

Hi,

I am trying to install pymc from conda on the osx-64 platform. Here is the list of packages installed

channels: !!python/tuple
- conda-forge
- defaults
dependencies:
- conda-forge::appnope=0.1.0=py35_0
- conda-forge::bleach=1.5.0=py35_0
- conda-forge::ca-certificates=2017.1.23=0
- conda-forge::certifi=2017.1.23=py35_0
- conda-forge::cycler=0.10.0=py35_0
- conda-forge::decorator=4.0.11=py35_0
- conda-forge::entrypoints=0.2.2=py35_1
- conda-forge::freetype=2.7=1
- conda-forge::html5lib=0.999=py35_0
- conda-forge::icu=58.1=1
- conda-forge::ipykernel=4.5.2=py35_0
- conda-forge::ipython=5.3.0=py35_0
- conda-forge::ipython_genutils=0.2.0=py35_0
- conda-forge::ipywidgets=6.0.0=py35_0
- conda-forge::jinja2=2.9.5=py35_0
- conda-forge::jpeg=9b=0
- conda-forge::jsonschema=2.5.1=py35_0
- conda-forge::jupyter=1.0.0=py35_0
- conda-forge::jupyter_client=5.0.0=py35_0
- conda-forge::jupyter_console=5.1.0=py35_0
- conda-forge::jupyter_core=4.3.0=py35_0
- conda-forge::libgfortran=3.0.0=0
- conda-forge::libpng=1.6.28=0
- conda-forge::libsodium=1.0.10=0
- conda-forge::libtiff=4.0.6=7
- conda-forge::markupsafe=0.23=py35_1
- conda-forge::matplotlib=2.0.0=np111py35_2
- conda-forge::mistune=0.7.3=py35_1
- conda-forge::nb_conda=2.0.0=py35_0
- conda-forge::nb_conda_kernels=2.0.0=py35_0
- conda-forge::nbconvert=5.1.1=py35_0
- conda-forge::nbformat=4.2.0=py35_0
- conda-forge::ncurses=5.9=10
- conda-forge::notebook=4.4.1=py35_0
- conda-forge::openssl=1.0.2h=3
- conda-forge::pandas=0.19.2=np111py35_1
- conda-forge::pandoc=1.19.2=0
- conda-forge::pandocfilters=1.4.1=py35_0
- conda-forge::pexpect=4.2.1=py35_0
- conda-forge::pickleshare=0.7.3=py35_0
- conda-forge::pip=9.0.1=py35_0
- conda-forge::prompt_toolkit=1.0.13=py35_0
- conda-forge::ptyprocess=0.5.1=py35_0
- conda-forge::pygments=2.2.0=py35_0
- conda-forge::pymc=2.3.6=np111py35_0
- conda-forge::pyparsing=2.2.0=py35_0
- conda-forge::pyqt=4.11.4=py35_2
- conda-forge::python=3.5.3=1
- conda-forge::python-dateutil=2.6.0=py35_0
- conda-forge::pytz=2016.10=py35_0
- conda-forge::pyzmq=16.0.2=py35_1
- conda-forge::qt=4.8.7=7
- conda-forge::qtconsole=4.2.1=py35_1
- conda-forge::readline=6.2=0
- conda-forge::setuptools=33.1.1=py35_0
- conda-forge::simplegeneric=0.8.1=py35_0
- conda-forge::sip=4.18=py35_1
- conda-forge::six=1.10.0=py35_1
- conda-forge::sqlite=3.13.0=1
- conda-forge::terminado=0.6=py35_0
- conda-forge::testpath=0.3=py35_0
- conda-forge::tk=8.5.19=1
- conda-forge::tornado=4.4.2=py35_0
- conda-forge::traitlets=4.3.2=py35_0
- conda-forge::wcwidth=0.1.7=py35_0
- conda-forge::webencodings=0.5=py35_0
- conda-forge::wheel=0.29.0=py35_0
- conda-forge::widgetsnbextension=2.0.0=py35_0
- conda-forge::xz=5.2.2=0
- conda-forge::zeromq=4.2.1=1
- conda-forge::zlib=1.2.11=0
- mkl=2017.0.1=0
- numpy=1.11.3=py35_0
- scipy=0.19.0=np111py35_0
- pip:
  - ipython-genutils==0.2.0
  - jupyter-client==5.0.0
  - jupyter-console==5.1.0
  - jupyter-core==4.3.0
  - nb-conda==2.0.0
  - nb-conda-kernels==2.0.0
  - prompt-toolkit==1.0.13

While importing the pymc module, I stumbled upon this problem:

Python 3.5.3 | packaged by conda-forge | (default, Feb 10 2017, 07:09:50) 
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pymc
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-5f262cfcb99b> in <module>()
----> 1 import pymc

/Users/PetitLepton/miniconda3/envs/analytics/lib/python3.5/site-packages/pymc/__init__.py in <module>()
     28 from .PyMCObjects import *
     29 from .InstantiationDecorators import *
---> 30 from .CommonDeterministics import *
     31 from .NumpyDeterministics import *
     32 from .distributions import *

/Users/PetitLepton/miniconda3/envs/analytics/lib/python3.5/site-packages/pymc/CommonDeterministics.py in <module>()
     19 import inspect
     20 import types
---> 21 from .utils import safe_len, stukel_logit, stukel_invlogit, logit, invlogit, value, find_element
     22 from copy import copy
     23 import sys

/Users/PetitLepton/miniconda3/envs/analytics/lib/python3.5/site-packages/pymc/utils.py in <module>()
     12 from copy import copy
     13 from .PyMCObjects import Variable
---> 14 from . import flib
     15 import pdb
     16 from numpy.linalg.linalg import LinAlgError

ImportError: dlopen(/Users/PetitLepton/miniconda3/envs/analytics/lib/python3.5/site-packages/pymc/flib.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libopenblasp-r0.2.19.dylib
  Referenced from: /Users/PetitLepton/miniconda3/envs/analytics/lib/python3.5/site-packages/pymc/flib.cpython-35m-darwin.so
  Reason: image not found

It seems that pymc requires openblas (it does work after installing it) but it is not part of the required packages during installation.

fonnesbeck commented 7 years ago

It does not require openblas (it will build the necessary BLAS and LAPACK subset included with the PyMC source), but it looks like it was expecting the library when it was not there.

PetitLepton commented 7 years ago

Did I make mistake during the installation process?

fonnesbeck commented 7 years ago

It looks like you installed from conda. I suppose it could be added as a dependency to the PyMC recipe on conda-recipes. Feel free to open an issue there. I will close this since it does not appear to be an issue with the PyMC code base.

PetitLepton commented 7 years ago

OK, my apologies. I did not realise that the two projects were not jointly managed. Thanks for your help.