Home > Mobile >  How can I import pymc3 in anaconda?
How can I import pymc3 in anaconda?

Time:04-26

Thanks for helping me. I use windows 7 and want to use pymc3 in python3.7,

but it doesn't work, and I get no idea. Should I install other packages or there is any solution? I have tried all that I can see on the internet. I don't know why I can't post this question?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????


ImportError                               Traceback (most recent call last)
<ipython-input-10-200e74b8195d> in <module>
----> 1 import pymc3

C:\ProgramData\Anaconda3\lib\site-packages\pymc3\__init__.py in <module>
     37 
     38 
---> 39 __set_compiler_flags()
     40 
     41 from . import gp, ode, sampling

C:\ProgramData\Anaconda3\lib\site-packages\pymc3\__init__.py in __set_compiler_flags()
     31 def __set_compiler_flags():
     32     # Workarounds for Theano compiler problems on various platforms
---> 33     import theano
     34 
     35     current = theano.config.gcc.cxxflags

C:\ProgramData\Anaconda3\lib\site-packages\theano\__init__.py in <module>
     76 __api_version__ = 1
     77 
---> 78 from theano import scalar, tensor
     79 from theano.compile import (
     80     In,

C:\ProgramData\Anaconda3\lib\site-packages\theano\scalar\__init__.py in <module>
----> 1 from .basic import *
      2 from .basic_scipy import *

C:\ProgramData\Anaconda3\lib\site-packages\theano\scalar\basic.py in <module>
     22 
     23 import theano
---> 24 from theano import config, gof, printing
     25 from theano.gof import Apply, Constant, FunctionGraph, Op, Type, Variable, utils
     26 from theano.gradient import DisconnectedType, grad_undefined

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\__init__.py in <module>
      2 
      3 import theano
----> 4 from theano.gof.cc import CLinker, DualLinker, HideC, OpWiseCLinker
      5 from theano.gof.destroyhandler import DestroyHandler
      6 from theano.gof.fg import FunctionGraph, InconsistencyError, MissingInputError

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\cc.py in <module>
     13 import theano
     14 from theano import config
---> 15 from theano.gof import cmodule, graph, link, utils
     16 from theano.gof.callcache import CallCache
     17 from theano.gof.compilelock import get_lock, release_lock

C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\cmodule.py in <module>
     24 import theano
     25 from theano import config
---> 26 from theano.configdefaults import gcc_version_str, local_bitwidth
     27 
     28 # we will abuse the lockfile mechanism when reading and writing the registry

ImportError: cannot import name 'local_bitwidth' from 'theano.configdefaults' (C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py)

CodePudding user response:

I googled the error message and found this thread as the first result:

That could be because you still have the old theano installed (instead of the new fork theano-pymc). Try to uninstall PyMC and Theano and install PyMC again.

CodePudding user response:

First you have have to open cmd as administrator mode. then you type those command first you update all packages using conda update --all then used those command

  • conda install -c conda-forge pymc conda install -c
  • conda-forge/label/gcc7 pymc conda install -c
  • conda-forge/label/cf201901 pymc conda install -c
  • conda-forge/label/cf202003 pymc
  • Related