Cannot import name 'solve_triangular' from 'pytensor.tensor.linalg'

When importing pymc and pytensor, running into following error. Tried with package update as well.ImportError: cannot import name ‘solve_triangular’ from ‘pytensor.tensor.linalg’

Can someone help please. I also created a separate environment

Directly on import? How did you install pymc?

Using Anaconda environment, python 3.10. Created a separate environment and installed PyMC using Conda install PyMC.

Can you please help. Last time I imported PyMC in the same environment and everything worked fine. I dont know why PYMC creates an import issue everytime I import it especially when switching environments even though I make sure it is installed in every environment.

Can you post details about your environment? What’s the output of conda list in the environment that’s having trouble?

here it is. It could import pytensor so I re-installed pytensor. I think there is some version incompatibility but I am not able to solve it. :slight_smile:

Output
Location: /Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages

Requires: cons, etuples, filelock, logical-unification, miniKanren, numpy, scipy, setuptools, typing-extensions

Required-by: pymc

(Kaushiki) kaushikisingh@Kaushikis-MacBook-Air ~ % pip install --upgrade pytensor

Requirement already satisfied: pytensor in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (2.13.1)

Collecting pytensor

Downloading pytensor-2.17.3.tar.gz (3.5 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 6.7 MB/s eta 0:00:00

Installing build dependencies ... done

Getting requirements to build wheel ... done

Installing backend dependencies ... done

Preparing metadata (pyproject.toml) ... done

Requirement already satisfied: setuptools>=48.0.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (68.0.0)

Requirement already satisfied: scipy>=0.14 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.11.3)

Requirement already satisfied: numpy<1.26,>=1.17.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.22.3)

Requirement already satisfied: filelock in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (3.12.4)

Requirement already satisfied: etuples in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.3.9)

Requirement already satisfied: logical-unification in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: miniKanren in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.0.3)

Requirement already satisfied: cons in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: typing-extensions in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (4.7.1)

Requirement already satisfied: toolz in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.12.0)

Requirement already satisfied: multipledispatch in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.6.0)

Requirement already satisfied: six in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from multipledispatch->logical-unification->pytensor) (1.16.0)

Building wheels for collected packages: pytensor

Building wheel for pytensor (pyproject.toml) ... done

Created wheel for pytensor: filename=pytensor-2.17.3-cp310-cp310-macosx_11_0_arm64.whl size=1267160 sha256=671211432e93bc794a59f001b537206154ba2c383839526f8ffbe225f9eb872c

Stored in directory: /Users/kaushikisingh/Library/Caches/pip/wheels/14/3e/35/2ef1b698b9e91d6cb15232b51e9e91e60dbaf02b303c37e2cb

Successfully built pytensor

Installing collected packages: pytensor

Attempting uninstall: pytensor

Found existing installation: pytensor 2.13.1

Uninstalling pytensor-2.13.1:

Successfully uninstalled pytensor-2.13.1

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

pymc 5.8.2 requires arviz>=0.13.0, but you have arviz 0.11.2 which is incompatible.

pymc 5.8.2 requires pytensor<2.17,>=2.16.1, but you have pytensor 2.17.3 which is incompatible.

Successfully installed pytensor-2.16.3

(Kaushiki) kaushikisingh@Kaushikis-MacBook-Air ~ % pip uninstall pytensor

pip install pytensor

Found existing installation: pytensor 2.16.3

Uninstalling pytensor-2.16.3:

Would remove:

/Users/kaushikisingh/anaconda3/envs/Kaushiki/bin/pytensor-cache

/Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/bin/*

/Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pytensor-2.16.3.dist-info/*

/Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pytensor/*

Would not remove (might be manually added):

/Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/bin/theano_cache.py

/Users/kaushikisingh/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/bin/theano_nose.py

Proceed (Y/n)? Y

Successfully uninstalled pytensor-2.16.3

Requirement already satisfied: pytensor in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (2.17.3)

Requirement already satisfied: setuptools>=48.0.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (68.0.0)

Requirement already satisfied: scipy>=0.14 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.11.3)

Requirement already satisfied: numpy<1.26,>=1.17.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.22.3)

Requirement already satisfied: filelock in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (3.12.4)

Requirement already satisfied: etuples in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.3.9)

Requirement already satisfied: logical-unification in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: miniKanren in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.0.3)

Requirement already satisfied: cons in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: typing-extensions in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (4.7.1)

Requirement already satisfied: toolz in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.12.0)

Requirement already satisfied: multipledispatch in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.6.0)

Requirement already satisfied: six in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from multipledispatch->logical-unification->pytensor) (1.16.0)

(Kaushiki) kaushikisingh@Kaushikis-MacBook-Air ~ % pip install pytensor

Requirement already satisfied: pytensor in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (2.17.3)

Requirement already satisfied: setuptools>=48.0.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (68.0.0)

Requirement already satisfied: scipy>=0.14 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.11.3)

Requirement already satisfied: numpy<1.26,>=1.17.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.22.3)

Requirement already satisfied: filelock in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (3.12.4)

Requirement already satisfied: etuples in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.3.9)

Requirement already satisfied: logical-unification in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: miniKanren in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (1.0.3)

Requirement already satisfied: cons in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (0.4.6)

Requirement already satisfied: typing-extensions in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from pytensor) (4.7.1)

Requirement already satisfied: toolz in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.12.0)

Requirement already satisfied: multipledispatch in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->pytensor) (0.6.0)

Requirement already satisfied: six in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from multipledispatch->logical-unification->pytensor) (1.16.0)

(Kaushiki) kaushikisingh@Kaushikis-MacBook-Air ~ %

pip install PyTensor

Requirement already satisfied: PyTensor in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (2.17.3)

Requirement already satisfied: setuptools>=48.0.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (68.0.0)

Requirement already satisfied: scipy>=0.14 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (1.11.3)

Requirement already satisfied: numpy<1.26,>=1.17.0 in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (1.22.3)

Requirement already satisfied: filelock in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (3.12.4)

Requirement already satisfied: etuples in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (0.3.9)

Requirement already satisfied: logical-unification in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (0.4.6)

Requirement already satisfied: miniKanren in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (1.0.3)

Requirement already satisfied: cons in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (0.4.6)

Requirement already satisfied: typing-extensions in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from PyTensor) (4.7.1)

Requirement already satisfied: toolz in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->PyTensor) (0.12.0)

Requirement already satisfied: multipledispatch in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from logical-unification->PyTensor) (0.6.0)

Requirement already satisfied: six in ./anaconda3/envs/Kaushiki/lib/python3.10/site-packages (from multipledispatch->logical-unification->PyTensor) (1.16.0)

(Kaushiki) kaushikisingh@Kaushikis-MacBook-Air ~ % conda install -c conda-forge pytensor

Collecting package metadata (current_repodata.json): done

Solving environment: done

# All requested packages already installed.

What does it show if you just run conda list?

It shows a different error now even though I have installed pytensor separately:

ModuleNotFoundError Traceback (most recent call last)
Cell In[16], line 2
1 import numpy as np
----> 2 import pymc as pm
3 import matplotlib.pyplot as plt
4 import arviz as az

File ~/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pymc/init.py:47
42 augmented = f"{augmented} -fno-unwind-tables -fno-asynchronous-unwind-tables"
44 pytensor.config.gcc__cxxflags = augmented
—> 47 __set_compiler_flags()
49 from pymc import _version, gp, ode, sampling
50 from pymc.backends import *

File ~/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pymc/init.py:30, in __set_compiler_flags()
28 def __set_compiler_flags():
29 # Workarounds for PyTensor compiler problems on various platforms
—> 30 import pytensor
32 current = pytensor.config.gcc__cxxflags
33 augmented = f"{current} -Wno-c++11-narrowing"

ModuleNotFoundError: No module named ‘pytensor’

I mean in a terminal, with the Kaushiki environment activated, type conda list and post the output. This command shows all the packages you have installed, so I can suggest what you need to do to fix the problem.

Did you follow the official installation instructions to make this environment?

Output of `conda list`

packages in environment at /Users/kaushikisingh/anaconda3/envs/Kaushiki:

Name Version Build Channel

_tflow_select 2.2.0 eigen
abseil-cpp 20211102.0 hc377ac9_0
absl-py 1.4.0 py310hca03da5_0
aiohttp 3.8.5 py310h80987f9_0
aiosignal 1.2.0 pyhd3eb1b0_0
alabaster 0.7.13 pypi_0 pypi
anyio 3.5.0 py310hca03da5_0
appnope 0.1.2 py310hca03da5_1001
argon2-cffi 21.3.0 pyhd3eb1b0_0
argon2-cffi-bindings 21.2.0 py310h1a28f6b_0
arviz 0.16.1 pypi_0 pypi
asttokens 2.0.5 pyhd3eb1b0_0
astunparse 1.6.3 py_0
async-timeout 4.0.2 py310hca03da5_0
attrs 23.1.0 py310hca03da5_0
babel 2.13.0 pypi_0 pypi
backcall 0.2.0 pyhd3eb1b0_0
beautifulsoup4 4.12.2 py310hca03da5_0
blas 1.0 openblas
bleach 4.1.0 pyhd3eb1b0_0
blinker 1.6.2 py310hca03da5_0
blosc 1.21.3 h313beb8_0
bottleneck 1.3.5 py310h96f19d2_0
brotli 1.0.9 h1a28f6b_7
brotli-bin 1.0.9 h1a28f6b_7
brotli-python 1.0.9 py310hc377ac9_7
bzip2 1.0.8 h620ffc9_4
c-ares 1.19.1 h80987f9_0
c-blosc2 2.8.0 h313beb8_0
ca-certificates 2023.08.22 hca03da5_0
cachetools 5.3.1 pypi_0 pypi
cctools_osx-arm64 949.0.1 h332cad3_25
certifi 2023.7.22 py310hca03da5_0
cffi 1.15.1 py310h80987f9_3
cftime 1.6.2 py310hbda83bc_0
charset-normalizer 3.3.0 pypi_0 pypi
clang 12.0.0 hca03da5_4
clang-12 12.0.0 default_he099f3d_4
clang_osx-arm64 12.0.0 hcb56dc5_3
clangxx 12.0.0 default_he099f3d_4
clangxx_osx-arm64 12.0.0 h39b79ac_3
click 8.1.7 py310hca03da5_0
cloudpickle 2.2.1 pypi_0 pypi
comm 0.1.2 py310hca03da5_0
compiler-rt 12.0.0 h4ccfd99_3
compiler-rt_osx-arm64 12.0.0 h4fb70ea_3
cons 0.4.6 py310hca03da5_0
contourpy 1.0.5 py310h525c30c_0
cryptography 41.0.3 py310h3c57c4d_0
cycler 0.11.0 pyhd3eb1b0_0
debugpy 1.6.7 py310h313beb8_0
decorator 5.1.1 pyhd3eb1b0_0
defusedxml 0.7.1 pyhd3eb1b0_0
dill 0.3.7 pypi_0 pypi
docutils 0.20.1 pypi_0 pypi
dsgepy 0.1 pypi_0 pypi
entrypoints 0.4 py310hca03da5_0
etuples 0.3.9 py310hca03da5_0
exceptiongroup 1.0.4 py310hca03da5_0
executing 0.8.3 pyhd3eb1b0_0
fastprogress 1.0.3 pypi_0 pypi
fftw 3.3.9 h1a28f6b_1
filelock 3.12.4 pypi_0 pypi
flatbuffers 2.0.0 hc377ac9_0
fonttools 4.25.0 pyhd3eb1b0_0
freetype 2.12.1 h1192e45_0
frozenlist 1.3.3 py310h80987f9_0
future 0.18.3 pypi_0 pypi
gast 0.4.0 pyhd3eb1b0_0
giflib 5.2.1 h80987f9_3
gmp 6.2.1 hc377ac9_3
gmpy2 2.1.2 py310h8c48613_0
google-auth 2.22.0 py310hca03da5_0
google-auth-oauthlib 0.5.2 py310hca03da5_0
google-pasta 0.2.0 pyhd3eb1b0_0
grpc-cpp 1.48.2 h877324c_0
grpcio 1.48.2 py310h877324c_0
h5netcdf 1.2.0 pypi_0 pypi
h5py 3.9.0 py310haafd478_0
hdf4 4.2.13 h5e329fb_3
hdf5 1.12.1 h160e8cb_2
icu 68.1 hc377ac9_0
idna 3.4 py310hca03da5_0
imagesize 1.4.1 pypi_0 pypi
ipykernel 6.25.0 py310h33ce5c2_0
ipython 8.15.0 py310hca03da5_0
ipython_genutils 0.2.0 pyhd3eb1b0_1
jedi 0.18.1 py310hca03da5_1
jinja2 3.1.2 py310hca03da5_0
joblib 1.2.0 py310hca03da5_0
jpeg 9e h80987f9_1
jsonschema 4.17.3 py310hca03da5_0
jupyter_client 7.4.9 py310hca03da5_0
jupyter_core 5.3.0 py310hca03da5_0
jupyter_server 1.23.4 py310hca03da5_0
jupyterlab_pygments 0.1.2 py_0
keras 2.12.0 py310hca03da5_0
keras-preprocessing 1.1.2 pyhd3eb1b0_0
kiwisolver 1.4.4 py310h313beb8_0
krb5 1.20.1 h8380606_1
lcms2 2.12 hba8e193_0
ld64_osx-arm64 530 h001ce53_24
ldid 2.1.5 h20b2a84_3
lerc 3.0 hc377ac9_0
libbrotlicommon 1.0.9 h1a28f6b_7
libbrotlidec 1.0.9 h1a28f6b_7
libbrotlienc 1.0.9 h1a28f6b_7
libclang-cpp12 12.0.0 default_he099f3d_4
libcurl 8.2.1 h0f1d93c_0
libcxx 14.0.6 h848a8c0_0
libdeflate 1.17 h80987f9_1
libedit 3.1.20221030 h80987f9_0
libev 4.33 h1a28f6b_1
libffi 3.4.4 hca03da5_0
libgfortran 5.0.0 11_3_0_hca03da5_28
libgfortran5 11.3.0 h009349e_28
libiconv 1.16 h1a28f6b_2
libllvm12 12.0.0 h12f7ac0_4
libllvm14 14.0.6 h7ec7a93_3
libnetcdf 4.8.1 ha022005_4
libnghttp2 1.52.0 h10c0552_1
libopenblas 0.3.21 h269037a_0
libpng 1.6.39 h80987f9_0
libprotobuf 3.20.3 h514c7bf_0
libsodium 1.0.18 h1a28f6b_0
libssh2 1.10.0 h449679c_2
libtiff 4.5.1 h313beb8_0
libwebp 1.3.2 ha3663a8_0
libwebp-base 1.3.2 h80987f9_0
libxml2 2.10.4 h372ba2a_0
libxslt 1.1.37 habca612_0
libzip 1.8.0 h0c481fb_0
llvm-openmp 14.0.6 hc6e5704_0
llvm-tools 12.0.0 h12f7ac0_4
logical-unification 0.4.6 py310hca03da5_0
lxml 4.9.3 py310h50ffb84_0
lz4-c 1.9.4 h313beb8_0
lzo 2.10 h1a28f6b_2
markdown 3.4.1 py310hca03da5_0
markupsafe 2.1.1 py310h1a28f6b_0
matplotlib-base 3.7.2 py310h46d7db6_0
matplotlib-inline 0.1.6 py310hca03da5_0
minikanren 1.0.3 py310hca03da5_0
mistune 0.8.4 py310h1a28f6b_1000
mpc 1.1.0 h8c48613_1
mpfr 4.0.2 h695f6f0_1
mpmath 1.3.0 py310hca03da5_0
multidict 6.0.2 py310h1a28f6b_0
multipledispatch 1.0.0 pypi_0 pypi
munkres 1.1.4 py_0
nbclassic 0.5.5 py310hca03da5_0
nbclient 0.5.13 py310hca03da5_0
nbconvert 6.5.4 py310hca03da5_0
nbformat 5.9.2 py310hca03da5_0
ncurses 6.4 h313beb8_0
nest-asyncio 1.5.6 py310hca03da5_0
netcdf4 1.6.2 py310he1bbb67_0
notebook 6.5.4 py310hca03da5_1
notebook-shim 0.2.2 py310hca03da5_0
numexpr 2.8.4 py310hecc3335_1
numpy 1.25.2 pypi_0 pypi
numpy-base 1.22.3 py310h5e3e9f0_0
numpydoc 1.6.0 pypi_0 pypi
oauthlib 3.2.2 py310hca03da5_0
openssl 1.1.1w h1a28f6b_0
opt_einsum 3.3.0 pyhd3eb1b0_1
packaging 23.1 py310hca03da5_0
pandas 2.0.3 py310h46d7db6_0
pandocfilters 1.5.0 pyhd3eb1b0_0
parso 0.8.3 pyhd3eb1b0_0
patsy 0.5.3 pypi_0 pypi
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 9.4.0 py310h313beb8_1
pip 23.2.1 py310hca03da5_0
platformdirs 3.10.0 py310hca03da5_0
prometheus_client 0.14.1 py310hca03da5_0
prompt-toolkit 3.0.36 py310hca03da5_0
protobuf 3.20.3 py310h313beb8_0
psutil 5.9.0 py310h1a28f6b_0
ptyprocess 0.7.0 pyhd3eb1b0_2
pure_eval 0.2.2 pyhd3eb1b0_0
py-cpuinfo 8.0.0 pyhd3eb1b0_1
pyasn1 0.4.8 pyhd3eb1b0_0
pyasn1-modules 0.2.8 py_0
pycparser 2.21 pyhd3eb1b0_0
pygments 2.15.1 py310hca03da5_1
pyjwt 2.4.0 py310hca03da5_0
pykalman 0.9.5 pypi_0 pypi
pymc 5.8.2 pypi_0 pypi
pymc-learn 0.0.1rc3 pypi_0 pypi
pymc3 3.11.4 pypi_0 pypi
pyopenssl 23.2.0 py310hca03da5_0
pyparsing 3.0.9 py310hca03da5_0
pyrsistent 0.18.0 py310h1a28f6b_0
pysocks 1.7.1 py310hca03da5_0
pytables 3.8.0 py310he080bb3_3
pytensor 2.17.3 pypi_0 pypi
python 3.10.13 hc0d8a6c_0
python-dateutil 2.8.2 pyhd3eb1b0_0
python-fastjsonschema 2.16.2 py310hca03da5_0
python-flatbuffers 2.0 pyhd3eb1b0_0
python-tzdata 2023.3 pyhd3eb1b0_0
pytz 2023.3.post1 py310hca03da5_0
pyzmq 23.2.0 py310hc377ac9_0
re2 2022.04.01 hc377ac9_0
readline 8.2 h1a28f6b_0
requests 2.31.0 py310hca03da5_0
requests-oauthlib 1.3.0 py_0
rsa 4.7.2 pyhd3eb1b0_1
scikit-learn 1.3.0 py310h46d7db6_0
scipy 1.11.3 pypi_0 pypi
seaborn 0.13.0 pypi_0 pypi
semver 3.0.1 pypi_0 pypi
send2trash 1.8.0 pyhd3eb1b0_1
setuptools 68.0.0 py310hca03da5_0
six 1.16.0 pyhd3eb1b0_1
snappy 1.1.9 hc377ac9_0
sniffio 1.2.0 py310hca03da5_1
snowballstemmer 2.2.0 pypi_0 pypi
soupsieve 2.5 py310hca03da5_0
sphinx 7.2.6 pypi_0 pypi
sphinxcontrib-applehelp 1.0.7 pypi_0 pypi
sphinxcontrib-devhelp 1.0.5 pypi_0 pypi
sphinxcontrib-htmlhelp 2.0.4 pypi_0 pypi
sphinxcontrib-jsmath 1.0.1 pypi_0 pypi
sphinxcontrib-qthelp 1.0.6 pypi_0 pypi
sphinxcontrib-serializinghtml 1.1.9 pypi_0 pypi
sqlite 3.41.2 h80987f9_0
stack_data 0.2.0 pyhd3eb1b0_0
statsmodels 0.14.0 py310hbda83bc_0
sympy 1.11.1 py310hca03da5_0
tabulate 0.9.0 pypi_0 pypi
tapi 1100.0.11 h8754e6a_1
tensorboard 2.12.1 py310hca03da5_0
tensorboard-data-server 0.7.0 py310ha6e5c4f_0
tensorboard-plugin-wit 1.8.1 py310hca03da5_0
tensorflow 2.12.0 eigen_py310h205ab9b_0
tensorflow-base 2.12.0 eigen_py310h0a52ebb_0
tensorflow-estimator 2.12.0 py310hca03da5_0
termcolor 2.1.0 py310hca03da5_0
terminado 0.17.1 py310hca03da5_0
theano 1.0.5 py310hc377ac9_0
theano-pymc 1.1.2 pypi_0 pypi
threadpoolctl 2.2.0 pyh0d69192_0
tinycss2 1.2.1 py310hca03da5_0
tk 8.6.12 hb8d0fd4_0
tomli 2.0.1 pypi_0 pypi
toolz 0.12.0 py310hca03da5_0
tornado 6.3.2 py310h80987f9_0
tqdm 4.65.0 py310h33ce5c2_0
traitlets 5.7.1 py310hca03da5_0
typing-extensions 4.8.0 pypi_0 pypi
typing_extensions 4.7.1 py310hca03da5_0
tzdata 2023c h04d1e81_0
urllib3 2.0.6 pypi_0 pypi
wcwidth 0.2.5 pyhd3eb1b0_0
webencodings 0.5.1 py310hca03da5_1
websocket-client 0.58.0 py310hca03da5_4
werkzeug 2.2.3 py310hca03da5_0
wheel 0.35.1 pyhd3eb1b0_0
wrapt 1.14.1 py310h1a28f6b_0
xarray 2023.6.0 py310hca03da5_0
xarray-einstats 0.6.0 pypi_0 pypi
xz 5.4.2 h80987f9_0
yarl 1.8.1 py310h1a28f6b_0
zeromq 4.3.4 hc377ac9_0
zlib 1.2.13 h5a0b063_0
zlib-ng 2.0.7 h80987f9_0
zstd 1.5.5 hd90d995_0

You shouldn’t mix pymc3, pymc, theano, theano-pymc, and pytensor all in the same environment. It can lead to namespace collisions because of overlaps in the code bases. I suspect this is what is happening here.

I strongly recommend making a new environment (following the official installation guide), and that you stick to the most recent version of PyMC, which is 5.9.1.

so in new environment I just work with pymc and pytensor? what about theano?

The PyMC team took over development of Theano a while back, after it was sunset by the original developers. The package called “theano” is just for archive purposes at this point, for use with legacy code. The modern descendant of Theano that is currently maintained was renamed to “pytensor”, and that’s all you need to power PyMC now.

Thank you. I will try again in a new environment.

So, I created a new environment - installed pymc and pytensor and when I import pymc it is throwing the following error:

AttributeError: module ‘numpy.config’ has no attribute ‘get_info’

Can you help please

This is an old bug that has been fixed in the most recent PyMC. Did you follow the installation guide? If not, what steps did you take?

i used the following:
conda create -c conda-forge -n pymc_env “pymc>=4”
conda activate pymc_env

However when i try to open a jupyter notebook file containing the codes in pmc_env, it throws an “interner Server 500” error

Do you get an error if you import pymc from a python running directly in the terminal (and not in a jupyter notebook)?

Yes, I am installing pymc in terminal. installing and importing it within notebook throws the error:AttributeError: module ‘numpy.config’ has no attribute ‘get_info’

And when i activate pymc_env and lunch jupyter notebook, opening a new python kernel throws “Internal Server 500 Error”. I am not sure but is there a problem with pymc working on jupyter notebook. how can i correct the following error in import:
AttributeError Traceback (most recent call last)
Cell In[10], line 1
----> 1 import pytensor

AttributeError: module ‘numpy.config’ has no attribute ‘get_info’

I was asking if you can inport it when running python in the terminal.

terminal (with activated conda environment) → python → import pymc

If so it means you are not linking to the correct environment when trying to use jupyter. You may have to manually install an environment with python -m ipykernel install --user --name=pymc`` or something like that.