I installed pymc3 with the following commands pip install pymc3 in cmd.exe and in Anaconda Prompt. Running a python code including pymc3 I am encountered the following error:
AttributeError: partially initialized module ‘theano’ has no attribute ‘compile’ (most likely due to a circular import)
How can I fix this issue?
AttributeError Traceback (most recent call last)
Cell In[9], line 6
3 uncensored=censored[(censored>low)]
4 assert len(uncensored) == n_observed
----> 6 from pymc3.distributions.dist_math import normal_lcdf
7 from pymc3.distributions.dist_math import normal_lccdf
8 import pymc3 as pm
File ~\AppData\Roaming\Python\Python311\site-packages\pymc3_init_.py:23
20 import platform
22 import semver
—> 23 import theano
25 _log = logging.getLogger(“pymc3”)
27 if not logging.root.handlers:
File ~\AppData\Roaming\Python\Python311\site-packages\theano_init_.py:83
75 # This is the api version for ops that generate C code. External ops
76 # might need manual changes if this number goes up. An undefined
77 # api_version can be understood to mean api version 0.
78 #
79 # This number is not tied to the release version and should change
80 # very rarely.
81 api_version = 1
—> 83 from theano import scalar, tensor
84 from theano.compile import (
85 In,
86 Mode,
(…)
93 shared,
94 )
95 from theano.compile.function import function, function_dump
File ~\AppData\Roaming\Python\Python311\site-packages\theano\scalar_init_.py:1
----> 1 from .basic import *
2 from .basic_scipy import *
File ~\AppData\Roaming\Python\Python311\site-packages\theano\scalar\basic.py:710
706 return shape_info
709 # Register C code for ViewOp on Scalars.
→ 710 theano.compile.register_view_op_c_code(
711 Scalar,
712 “”"
713 %(oname)s = %(iname)s;
714 “”",
715 1,
716 )
719 bool = get_scalar_type(“bool”)
720 int8 = get_scalar_type(“int8”)
AttributeError: partially initialized module ‘theano’ has no attribute ‘compile’ (most likely due to a circular import)