I have a problem when importing pymc3.
Previously, it worked perfectly fine.
But, after somedays I cannot import it.
I did install several other packages,
but I don’t remember what makes this error.
do I need to upgrade or downgrade some packages?
import pymc3 as pm
---------------------------------------------------------------------------
NoSectionError Traceback (most recent call last)
~/opt/anaconda3/lib/python3.8/site-packages/theano/configparser.py in fetch_val_for_key(self, key, delete_key)
237 try:
--> 238 return self._theano_cfg.get(section, option)
239 except InterpolationError:
~/opt/anaconda3/lib/python3.8/configparser.py in get(self, section, option, raw, vars, fallback)
780 try:
--> 781 d = self._unify_values(section, vars)
782 except NoSectionError:
~/opt/anaconda3/lib/python3.8/configparser.py in _unify_values(self, section, vars)
1148 if section != self.default_section:
-> 1149 raise NoSectionError(section) from None
1150 # Update with the entry specific variables
NoSectionError: No section: 'blas'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
~/opt/anaconda3/lib/python3.8/site-packages/theano/configparser.py in __get__(self, cls, type_, delete_key)
353 try:
--> 354 val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
355 self.is_default = False
~/opt/anaconda3/lib/python3.8/site-packages/theano/configparser.py in fetch_val_for_key(self, key, delete_key)
241 except (NoOptionError, NoSectionError):
--> 242 raise KeyError(key)
243
KeyError: 'blas__ldflags'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-13-2e5c536b7c65> in <module>
----> 1 import pymc3 as pm
~/opt/anaconda3/lib/python3.8/site-packages/pymc3/__init__.py in <module>
21
22 import semver
---> 23 import theano
24
25 _log = logging.getLogger("pymc3")
~/opt/anaconda3/lib/python3.8/site-packages/theano/__init__.py in <module>
81 __api_version__ = 1
82
---> 83 from theano import scalar, tensor
84 from theano.compile import (
85 In,
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/__init__.py in <module>
18 verify_grad,
19 )
---> 20 from theano.tensor import nnet # used for softmax, sigmoid, etc.
21 from theano.tensor import sharedvar # adds shared-variable constructors
22 from theano.tensor import (
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/nnet/__init__.py in <module>
1 import warnings
2
----> 3 from . import opt
4 from .abstract_conv import conv2d as abstract_conv2d
5 from .abstract_conv import conv2d_grad_wrt_inputs, conv3d, separable_conv2d
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/nnet/opt.py in <module>
30
31 # Cpu implementation
---> 32 from theano.tensor.nnet.conv import ConvOp, conv2d
33 from theano.tensor.nnet.corr import CorrMM, CorrMM_gradInputs, CorrMM_gradWeights
34 from theano.tensor.nnet.corr3d import Corr3dMM, Corr3dMMGradInputs, Corr3dMMGradWeights
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/nnet/conv.py in <module>
18 from theano.graph.basic import Apply
19 from theano.graph.op import OpenMPOp
---> 20 from theano.tensor import blas
21 from theano.tensor.basic import (
22 NotScalarConstantError,
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/blas.py in <module>
161 from theano.scalar import bool as bool_t
162 from theano.tensor import basic as tt
--> 163 from theano.tensor.blas_headers import blas_header_text, blas_header_version
164 from theano.tensor.opt import in2out, local_dimshuffle_lift
165 from theano.tensor.type import values_eq_approx_remove_inf_nan
~/opt/anaconda3/lib/python3.8/site-packages/theano/tensor/blas_headers.py in <module>
1014
1015
-> 1016 if not config.blas__ldflags:
1017 _logger.warning("Using NumPy C-API based implementation for BLAS functions.")
1018
~/opt/anaconda3/lib/python3.8/site-packages/theano/configparser.py in __get__(self, cls, type_, delete_key)
356 except KeyError:
357 if callable(self.default):
--> 358 val_str = self.default()
359 else:
360 val_str = self.default
~/opt/anaconda3/lib/python3.8/site-packages/theano/link/c/cmodule.py in default_blas_ldflags()
2619 # If the old private interface is available use it as it
2620 # don't print information to the user.
-> 2621 blas_info = numpy.distutils.__config__.blas_opt_info
2622 else:
2623 # We do this import only here, as in some setup, if we
AttributeError: module 'numpy.distutils.__config__' has no attribute 'blas_opt_info'
EDIT:
It works fine if I install this version of numpy.
pip3 install --upgrade numpy==1.20.3