ImportError: Can't determine version for numexpr

I upgraded from pymc 5.0 to 5.4.0 by running

conda update -c conda-forge pymc

I 'm getting this ImportError: Can't determine version for numexpr when I import like this:

import arviz as az
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pickle
import plotly.express as px
import pymc as pm
from scipy import stats

Note that just importing numpy is fine but even if I place it on top, I still get an error importing arviz. If I comment out arviz, then I get the error on pandas. If I put pymc on top then I get an error on it.

It’s probably annoying, but I might suggest creating a new environment if you can. Trying to update a single package is a bit fraught. If a new environment isn’t possible, then you can try to dump the versions of the packages installed in your current environment (e.g., conda list) and maybe someone could suggest a solution.

Thanks, if upgrading pymc breaks things, this information should really go into the instructions here.

Here’s the list:

Summary

packages in environment at C:\Users\x\miniconda3\envs\pymc_env:

Name Version Build Channel

aesara 2.8.9 py311h520a730_0 conda-forge
aesara-base 2.8.9 py311h1ea47a8_0 conda-forge
anyio 3.6.2 pyhd8ed1ab_0 conda-forge
argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py311ha68e1ae_3 conda-forge
arviz 0.15.1 pyhd8ed1ab_0 conda-forge
asttokens 2.2.1 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
babel 2.12.1 pyhd8ed1ab_1 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
blas 1.0 mkl
bleach 6.0.0 pyhd8ed1ab_0 conda-forge
brotli 1.0.9 hcfcfb64_8 conda-forge
brotli-bin 1.0.9 hcfcfb64_8 conda-forge
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2023.5.7 h56e8100_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cachetools 5.3.0 pyhd8ed1ab_0 conda-forge
certifi 2023.5.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py311h7d9ee11_3 conda-forge
charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge
click 8.1.3 pypi_0 pypi
cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.1.3 pyhd8ed1ab_0 conda-forge
cons 0.4.5 pyhd8ed1ab_0 conda-forge
contourpy 1.0.7 py311h005e61a_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
debugpy 1.6.7 py311h12c1d0e_0 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
dynaconf 3.1.12 pypi_0 pypi
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
etuples 0.3.9 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
fastprogress 1.0.3 pyhd8ed1ab_0 conda-forge
filelock 3.12.0 pyhd8ed1ab_0 conda-forge
fitter 1.5.2 pypi_0 pypi
flit-core 3.9.0 pyhd8ed1ab_0 conda-forge
fonttools 4.39.4 py311ha68e1ae_0 conda-forge
freetype 2.12.1 h546665d_1 conda-forge
h5netcdf 1.1.0 pyhd8ed1ab_1 conda-forge
h5py 3.8.0 nompi_py311hfbc32a6_101 conda-forge
hdf5 1.14.0 nompi_h918d9b7_103 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.6.0 pyha770c72_0 conda-forge
importlib_metadata 6.6.0 hd8ed1ab_0 conda-forge
importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge
intel-openmp 2023.1.0 h57928b3_46319 conda-forge
ipykernel 6.23.1 pyh025b116_0 conda-forge
ipython 8.13.2 pyh08f2357_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
jedi 0.18.2 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
joblib 1.2.0 pyhd8ed1ab_0 conda-forge
json5 0.9.5 pyh9f0ad1d_0 conda-forge
jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge
jupyter_client 8.2.0 pyhd8ed1ab_0 conda-forge
jupyter_core 5.3.0 py311h1ea47a8_0 conda-forge
jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge
jupyter_server 2.5.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyterlab 3.5.2 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.22.1 pyhd8ed1ab_0 conda-forge
kiwisolver 1.4.4 py311h005e61a_1 conda-forge
krb5 1.20.1 heb0366b_0 conda-forge
lcms2 2.15 h3e3b177_1 conda-forge
lerc 4.0.0 h63175ca_0 conda-forge
libaec 1.0.6 h63175ca_1 conda-forge
libblas 3.9.0 16_win64_mkl conda-forge
libbrotlicommon 1.0.9 hcfcfb64_8 conda-forge
libbrotlidec 1.0.9 hcfcfb64_8 conda-forge
libbrotlienc 1.0.9 hcfcfb64_8 conda-forge
libcblas 3.9.0 16_win64_mkl conda-forge
libcurl 8.1.1 h68f0423_0 conda-forge
libdeflate 1.18 hcfcfb64_0 conda-forge
libexpat 2.5.0 h63175ca_1 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libhwloc 2.9.1 h51c2c0f_0 conda-forge
libiconv 1.17 h8ffe710_0 conda-forge
libjpeg-turbo 2.1.5.1 hcfcfb64_0 conda-forge
liblapack 3.9.0 16_win64_mkl conda-forge
libpng 1.6.39 h19919ed_0 conda-forge
libpython 2.2 py311h1ea47a8_2 conda-forge
libsodium 1.0.18 h8d14728_1 conda-forge
libsqlite 3.42.0 hcfcfb64_0 conda-forge
libssh2 1.10.0 h9a1e1f7_3 conda-forge
libtiff 4.5.0 h6c8260b_6 conda-forge
libwebp-base 1.3.0 hcfcfb64_0 conda-forge
libxcb 1.15 hcd874cb_0 conda-forge
libxml2 2.10.4 hc3477c8_0 conda-forge
libzlib 1.2.13 hcfcfb64_4 conda-forge
logical-unification 0.4.6 pyhd8ed1ab_0 conda-forge
m2w64-binutils 2.25.1 5 conda-forge
m2w64-bzip2 1.0.6 6 conda-forge
m2w64-crt-git 5.0.0.4636.2595836 2 conda-forge
m2w64-gcc 5.3.0 6 conda-forge
m2w64-gcc-ada 5.3.0 6 conda-forge
m2w64-gcc-fortran 5.3.0 6 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gcc-objc 5.3.0 6 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-headers-git 5.0.0.4636.c0ad18a 2 conda-forge
m2w64-isl 0.16.1 2 conda-forge
m2w64-libiconv 1.14 6 conda-forge
m2w64-libmangle-git 5.0.0.4509.2e5a9a2 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
m2w64-make 4.1.2351.a80a8b8 2 conda-forge
m2w64-mpc 1.0.3 3 conda-forge
m2w64-mpfr 3.1.4 4 conda-forge
m2w64-pkg-config 0.29.1 2 conda-forge
m2w64-toolchain 5.3.0 7 conda-forge
m2w64-toolchain_win-64 2.5.0 h57928b3_0 conda-forge
m2w64-tools-git 5.0.0.4592.90b8472 2 conda-forge
m2w64-windows-default-manifest 6.4 3 conda-forge
m2w64-winpthreads-git 5.0.0.4634.697f757 2 conda-forge
m2w64-zlib 1.2.8 10 conda-forge
markupsafe 2.1.2 py311ha68e1ae_0 conda-forge
matplotlib-base 3.7.1 py311h6e989c2_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
minikanren 1.0.3 pyhd8ed1ab_0 conda-forge
mistune 2.0.5 pyhd8ed1ab_0 conda-forge
mkl 2022.1.0 h6a75c08_874 conda-forge
mkl-service 2.4.0 py311hb3aad17_0 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
multipledispatch 0.6.0 py_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
nbclassic 1.0.0 pyh8b2e9e2_0 conda-forge
nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.4.0 pyhd8ed1ab_0 conda-forge
nbformat 5.8.0 pyhd8ed1ab_0 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
notebook 6.5.4 pyha770c72_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
numpy 1.24.3 py311h0b4df5a_0 conda-forge
openjpeg 2.5.0 ha2aaf27_2 conda-forge
openssl 3.1.0 hcfcfb64_3 conda-forge
packaging 23.1 pyhd8ed1ab_0 conda-forge
pandas 2.0.1 py311hf63dbb6_1 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.5.0 py311hde623f7_1 conda-forge
pip 23.1.2 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
platformdirs 3.5.1 pyhd8ed1ab_0 conda-forge
pooch 1.7.0 pyha770c72_3 conda-forge
prometheus_client 0.17.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.38 pyha770c72_0 conda-forge
prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge
psutil 5.9.5 py311ha68e1ae_0 conda-forge
pthread-stubs 0.4 hcd874cb_1001 conda-forge
pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pvlib 0.9.5 pypi_0 pypi
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.15.1 pyhd8ed1ab_0 conda-forge
pymc 5.4.0 hd8ed1ab_0 conda-forge
pymc-base 5.4.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyrsistent 0.19.3 py311ha68e1ae_0 conda-forge
pysocks 1.7.1 pyh0701188_6 conda-forge
pytensor 2.12.0 py311hfb14a36_0 conda-forge
pytensor-base 2.12.0 py311h12c1d0e_0 conda-forge
python 3.11.3 h2628c8c_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.17.1 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge
python_abi 3.11 3_cp311 conda-forge
pytz 2023.3 pyhd8ed1ab_0 conda-forge
pywin32 304 py311h12c1d0e_2 conda-forge
pywinpty 2.0.10 py311h12c1d0e_0 conda-forge
pyyaml 6.0 py311ha68e1ae_5 conda-forge
pyzmq 25.0.2 py311h7b3f143_0 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
scikit-learn 1.2.1 py311hd77b12b_0
scipy 1.10.1 py311h37ff6ca_3 conda-forge
send2trash 1.8.2 pyh08f2357_0 conda-forge
setuptools 67.7.2 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
tbb 2021.9.0 h91493d7_0 conda-forge
terminado 0.17.1 py311haa95532_0
threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h8ffe710_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tornado 6.3.2 py311ha68e1ae_0 conda-forge
tqdm 4.65.0 pypi_0 pypi
traitlets 5.9.0 pyhd8ed1ab_0 conda-forge
typing-extensions 4.6.1 hd8ed1ab_0 conda-forge
typing_extensions 4.6.1 pyha770c72_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 2.0.2 pyhd8ed1ab_0 conda-forge
vc 14.3 hb25d44b_16 conda-forge
vc14_runtime 14.34.31931 h5081d32_16 conda-forge
vs2015_runtime 14.34.31931 hed1258a_16 conda-forge
wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 1.5.2 pyhd8ed1ab_0 conda-forge
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge
winpty 0.4.3 4 conda-forge
xarray 2023.5.0 pyhd8ed1ab_0 conda-forge
xarray-einstats 0.5.1 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.11 hcd874cb_0 conda-forge
xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
zeromq 4.3.4 h0e60522_1 conda-forge
zipp 3.15.0 pyhd8ed1ab_0 conda-forge
zstd 1.5.2 h12be248_6 conda-forge

Upgrading PyMC won’t, as a general rule, require the creation of a new environment. I do conda update pymc all the time and it goes fine. But users are free to install whatever version of whatever packages they wish in their environments which means there is an infinite number of combinations, some of which can lead to dependency problems.

I followed your initial advice and just reinstalled the entire environment and necessary packages and it solved this particular issue.

1 Like