pymc-devs / pymc-resources

PyMC educational resources
MIT License
1.96k stars 745 forks source link

issue importing pymc3 "cannot import as scalar from numpy" #208

Closed ericpena closed 2 years ago

ericpena commented 2 years ago

Hello. I've installed pymc3 on a MacBook m1 Pro using conda install pymc3 and I'm getting an error with cannot import name 'asscalar' from 'numpy'.

Currently I'm using:

The full error immediately after import pymc3 as pm reads as:

WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ericpena/miniforge3/envs/pymc3/lib/python3.10/site-packages/pymc3/__init__.py", line 41, in <module>
    from .distributions import *
  File "/Users/ericpena/miniforge3/envs/pymc3/lib/python3.10/site-packages/pymc3/distributions/__init__.py", line 15, in <module>
    from . import timeseries
  File "/Users/ericpena/miniforge3/envs/pymc3/lib/python3.10/site-packages/pymc3/distributions/timeseries.py", line 22, in <module>
    from pymc3.util import get_variable_name
  File "/Users/ericpena/miniforge3/envs/pymc3/lib/python3.10/site-packages/pymc3/util.py", line 21, in <module>
    from numpy import asscalar, ndarray
ImportError: cannot import name 'asscalar' from 'numpy' (/Users/ericpena/miniforge3/envs/pymc3/lib/python3.10/site-packages/numpy/__init__.py)

Can I receive support in importing pymc3 without this error (from what I read elsewhere, I believe I can ignore the warning on the top for now). Thank you!