Getting "WARNING (aesara.configdefaults): g++ not available," on fresh PyMC4 install

I have been getting the following warnings in a brand new envrionment:

Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:50) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc as pm
WARNING (aesara.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
WARNING (aesara.configdefaults): g++ not detected!  Aesara will be unable to compile C-implementations and will default to Python. Performance may be severely degraded. To remove this warning, set Aesara flags cxx to an empty string.
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

This envrionment was created with this command:

conda create -n test_env_pymc pymc>=4

For reference, this is on a Windows machine, so I don’t think the solution here would work out for me.

Among other packages, conda list shows:

pymc                      4.0.1           py310h5588dad_1    conda-forge

and

m2w64-toolchain           5.3.0                         7    conda-forge
m2w64-toolchain_win-64    2.4.0                         0    conda-forge

Models do converge, though slowly. Any ideas what is happening here and/or ideas on how to address it?

2 Likes

Welcome!

First off, I would suggest following the installation instructions found here when installing pymc. The main difference I see between those instructions and what you used is the preference for use of the conda-forge channel.

More directly relevant, is whether you have mkl-service installed. In fact, it might be useful to just show what conda list prints.

Hi @nicholasj, I’ve been working on the Conda package for PyMC, so I’d like to help you get this running correctly even though I don’t have Windows myself.

It would be really helpful if you could post your entire terminal session so that we can see exactly what’s going on.

You can create an expandable code block here in the Discourse comment editor with the following code:

[details="Summary"]
```
long terminal output goes here
```
[/details]

The result looks like:

Summary
long terminal output goes here
asdf
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
1 Like

So, after looking at these instructions, I realized I was creating the environment on top of a minimal Miniconda install. So, I pulled down the installer for the full Anaconda (2022.05, Windows 64 bit) and did a clean install and now it imports without warnings:

activation and import
c:\testing\anaconda_2022_05>conda activate test_pymc_env

c:\testing\anaconda_2022_05>SET DISTUTILS_USE_SDK=1

c:\testing\anaconda_2022_05>SET MSSdk=1

c:\testing\anaconda_2022_05>SET "VS_VERSION=15.0"

c:\testing\anaconda_2022_05>SET "VS_MAJOR=15"

c:\testing\anaconda_2022_05>SET "VS_YEAR=2017"

c:\testing\anaconda_2022_05>set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"

c:\testing\anaconda_2022_05>set "MSYS2_ENV_CONV_EXCL=CL"

c:\testing\anaconda_2022_05>set "PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll"

c:\testing\anaconda_2022_05>set "CXX=cl.exe"

c:\testing\anaconda_2022_05>set "CC=cl.exe"

c:\testing\anaconda_2022_05>set "VSINSTALLDIR="

c:\testing\anaconda_2022_05>set "NEWER_VS_WITH_OLDER_VC=0"

c:\testing\anaconda_2022_05>for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -version [15.0,16.0) -property installationPath`) do (set "VSINSTALLDIR=%i\" )

c:\testing\anaconda_2022_05>if not exist "" (for /F "usebackq tokens=*" %i in (`vswhere.exe -nologo -products * -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 -property installationPath`) do (
set "VSINSTALLDIR=%i\"
 set "NEWER_VS_WITH_OLDER_VC=1"
) )

c:\testing\anaconda_2022_05>if not exist "" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\" )

c:\testing\anaconda_2022_05>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\" )

c:\testing\anaconda_2022_05>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\" )

c:\testing\anaconda_2022_05>if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\" )

c:\testing\anaconda_2022_05>IF NOT "" == "" (
set "INCLUDE=;"
 set "LIB=;"
 set "CMAKE_PREFIX_PATH=;"
)

c:\testing\anaconda_2022_05>call :GetWin10SdkDir

c:\testing\anaconda_2022_05>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 exit /B 1

c:\testing\anaconda_2022_05>exit /B 0

c:\testing\anaconda_2022_05>for /F %i in ('dir /ON /B "\include\10.*"') DO (SET WindowsSDKVer=%~i )
The system cannot find the file specified.

c:\testing\anaconda_2022_05>if errorlevel 1 (echo "Didn't find any windows 10 SDK. I'm not sure if things will work, but let's try..." )  else (echo Windows SDK version found as: "" )
Windows SDK version found as: ""

c:\testing\anaconda_2022_05>IF "win-64" == "win-64" (
set "BITS=64"
 set "CMAKE_PLAT=x64"
)  ELSE (
set "BITS=32"
 set "CMAKE_PLAT=Win32"
)

c:\testing\anaconda_2022_05>IF 2017 GEQ 2019 (
set "CMAKE_GEN=Visual Studio 15 2017"
 set "USE_NEW_CMAKE_GEN_SYNTAX=1"
)  ELSE (
IF "win-64" == "win-64" (set "CMAKE_GEN=Visual Studio 15 2017 Win64" )  else (set "CMAKE_GEN=Visual Studio 15 2017" )
 set "USE_NEW_CMAKE_GEN_SYNTAX=0"
)

c:\testing\anaconda_2022_05>echo "NEWER_VS_WITH_OLDER_VC=0"
"NEWER_VS_WITH_OLDER_VC=0"

c:\testing\anaconda_2022_05>IF "0" == "1" (
set "CMAKE_GEN=Visual Studio 16 2019"
 set "USE_NEW_CMAKE_GEN_SYNTAX=1"
)

c:\testing\anaconda_2022_05>IF "" == "" SET "CMAKE_GENERATOR=Visual Studio 15 2017 Win64"

c:\testing\anaconda_2022_05>IF "0" == "1" (
IF "" == "" SET "CMAKE_GENERATOR_PLATFORM=x64"
 IF "" == "" SET "CMAKE_GENERATOR_TOOLSET=v141"
)

c:\testing\anaconda_2022_05>pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
The system cannot find the path specified.

c:\testing\anaconda_2022_05>CALL "VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.16
The system cannot find the path specified.

c:\testing\anaconda_2022_05>popd

c:\testing\anaconda_2022_05>call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1>nul 2>&1

c:\testing\anaconda_2022_05>if errorlevel 1 exit /B 1

c:\testing\anaconda_2022_05>exit /B 0

(test_pymc_env) c:\testing\anaconda_2022_05>c:\testing\anaconda_2022_05\envs\test_pymc_env\python
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:19) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import pymc as pm
>>>

I don’t know how using the full Anaconda distribution solves the problem, but it seems to work. Thanks!

Hi @nicholasj, thanks for the more detailed report! I’m glad you got things running.

I have been steadily improving the Conda package, and so I have a suspicion that your download of full Anaconda randomly coincided with a change I made.

In case you are motivated to experiment further, I’d be interested to see the output of the conda create... command.

Sure thing. Here’s what I’m getting for creating a new environment:

conda create output
c:\testing\anaconda_2022_05\Scripts>conda create -c conda-forge -n test_env_2 "pymc>=4"
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.12.0
  latest version: 4.13.0

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: c:\testing\anaconda_2022_05\envs\test_env_2

  added / updated specs:
    - pymc[version='>=4']


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    aeppl-0.0.31               |     pyhd8ed1ab_2           5 KB  conda-forge
    aeppl-base-0.0.31          |     pyhd8ed1ab_2          41 KB  conda-forge
    fonttools-4.34.2           |  py310he2412df_0         1.6 MB  conda-forge
    libpng-1.6.37              |       h1d00b33_3         735 KB  conda-forge
    openssl-3.0.5              |       h8ffe710_0         7.6 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        10.0 MB

The following NEW packages will be INSTALLED:

  aeppl              conda-forge/noarch::aeppl-0.0.31-pyhd8ed1ab_2
  aeppl-base         conda-forge/noarch::aeppl-base-0.0.31-pyhd8ed1ab_2
  aesara             conda-forge/win-64::aesara-2.7.4-py310hfa0c5ed_1
  aesara-base        conda-forge/win-64::aesara-base-2.7.4-py310h5588dad_1
  arviz              conda-forge/noarch::arviz-0.12.1-pyhd8ed1ab_0
  blas               conda-forge/win-64::blas-2.115-mkl
  blas-devel         conda-forge/win-64::blas-devel-3.9.0-15_win64_mkl
  brotli             conda-forge/win-64::brotli-1.0.9-h8ffe710_7
  brotli-bin         conda-forge/win-64::brotli-bin-1.0.9-h8ffe710_7
  bzip2              conda-forge/win-64::bzip2-1.0.8-h8ffe710_4
  ca-certificates    conda-forge/win-64::ca-certificates-2022.6.15-h5b45459_0
  cachetools         conda-forge/noarch::cachetools-5.0.0-pyhd8ed1ab_0
  certifi            conda-forge/win-64::certifi-2022.6.15-py310h5588dad_0
  cftime             conda-forge/win-64::cftime-1.6.1-py310h2873277_0
  cloudpickle        conda-forge/noarch::cloudpickle-2.1.0-pyhd8ed1ab_0
  cons               conda-forge/noarch::cons-0.4.5-pyhd8ed1ab_0
  curl               conda-forge/win-64::curl-7.83.1-h789b8ee_0
  cycler             conda-forge/noarch::cycler-0.11.0-pyhd8ed1ab_0
  etuples            conda-forge/noarch::etuples-0.3.5-pyhd8ed1ab_0
  fastprogress       conda-forge/noarch::fastprogress-1.0.2-pyhd8ed1ab_0
  filelock           conda-forge/noarch::filelock-3.7.1-pyhd8ed1ab_0
  fonttools          conda-forge/win-64::fonttools-4.34.2-py310he2412df_0
  freetype           conda-forge/win-64::freetype-2.10.4-h546665d_1
  hdf4               conda-forge/win-64::hdf4-4.2.15-h0e5069d_3
  hdf5               conda-forge/win-64::hdf5-1.12.1-nompi_h57737ce_104
  importlib-metadata conda-forge/win-64::importlib-metadata-4.11.4-py310h5588dad_0
  importlib_metadata conda-forge/noarch::importlib_metadata-4.11.4-hd8ed1ab_0
  intel-openmp       conda-forge/win-64::intel-openmp-2022.1.0-h57928b3_3787
  jpeg               conda-forge/win-64::jpeg-9e-h8ffe710_2
  kiwisolver         conda-forge/win-64::kiwisolver-1.4.3-py310h476a331_0
  krb5               conda-forge/win-64::krb5-1.19.3-hc8ab02b_0
  lcms2              conda-forge/win-64::lcms2-2.12-h2a16943_0
  lerc               conda-forge/win-64::lerc-3.0-h0e60522_0
  libblas            conda-forge/win-64::libblas-3.9.0-15_win64_mkl
  libbrotlicommon    conda-forge/win-64::libbrotlicommon-1.0.9-h8ffe710_7
  libbrotlidec       conda-forge/win-64::libbrotlidec-1.0.9-h8ffe710_7
  libbrotlienc       conda-forge/win-64::libbrotlienc-1.0.9-h8ffe710_7
  libcblas           conda-forge/win-64::libcblas-3.9.0-15_win64_mkl
  libcurl            conda-forge/win-64::libcurl-7.83.1-h789b8ee_0
  libdeflate         conda-forge/win-64::libdeflate-1.12-h8ffe710_0
  libffi             conda-forge/win-64::libffi-3.4.2-h8ffe710_5
  liblapack          conda-forge/win-64::liblapack-3.9.0-15_win64_mkl
  liblapacke         conda-forge/win-64::liblapacke-3.9.0-15_win64_mkl
  libnetcdf          conda-forge/win-64::libnetcdf-4.8.1-nompi_h1cc8e9d_102
  libpng             conda-forge/win-64::libpng-1.6.37-h1d00b33_3
  libssh2            conda-forge/win-64::libssh2-1.10.0-h9a1e1f7_2
  libtiff            conda-forge/win-64::libtiff-4.4.0-h2ed3b44_1
  libwebp            conda-forge/win-64::libwebp-1.2.2-h57928b3_0
  libwebp-base       conda-forge/win-64::libwebp-base-1.2.2-h8ffe710_1
  libxcb             conda-forge/win-64::libxcb-1.13-hcd874cb_1004
  libzip             conda-forge/win-64::libzip-1.9.2-h519de47_0
  libzlib            conda-forge/win-64::libzlib-1.2.12-h8ffe710_1
  logical-unificati~ conda-forge/noarch::logical-unification-0.4.5-pyhd8ed1ab_0
  lz4-c              conda-forge/win-64::lz4-c-1.9.3-h8ffe710_1
  m2w64-binutils     conda-forge/win-64::m2w64-binutils-2.25.1-5
  m2w64-bzip2        conda-forge/win-64::m2w64-bzip2-1.0.6-6
  m2w64-crt-git      conda-forge/win-64::m2w64-crt-git-5.0.0.4636.2595836-2
  m2w64-gcc          conda-forge/win-64::m2w64-gcc-5.3.0-6
  m2w64-gcc-ada      conda-forge/win-64::m2w64-gcc-ada-5.3.0-6
  m2w64-gcc-fortran  conda-forge/win-64::m2w64-gcc-fortran-5.3.0-6
  m2w64-gcc-libgfor~ conda-forge/win-64::m2w64-gcc-libgfortran-5.3.0-6
  m2w64-gcc-libs     conda-forge/win-64::m2w64-gcc-libs-5.3.0-7
  m2w64-gcc-libs-co~ conda-forge/win-64::m2w64-gcc-libs-core-5.3.0-7
  m2w64-gcc-objc     conda-forge/win-64::m2w64-gcc-objc-5.3.0-6
  m2w64-gmp          conda-forge/win-64::m2w64-gmp-6.1.0-2
  m2w64-headers-git  conda-forge/win-64::m2w64-headers-git-5.0.0.4636.c0ad18a-2
  m2w64-isl          conda-forge/win-64::m2w64-isl-0.16.1-2
  m2w64-libiconv     conda-forge/win-64::m2w64-libiconv-1.14-6
  m2w64-libmangle-g~ conda-forge/win-64::m2w64-libmangle-git-5.0.0.4509.2e5a9a2-2
  m2w64-libwinpthre~ conda-forge/win-64::m2w64-libwinpthread-git-5.0.0.4634.697f757-2
  m2w64-make         conda-forge/win-64::m2w64-make-4.1.2351.a80a8b8-2
  m2w64-mpc          conda-forge/win-64::m2w64-mpc-1.0.3-3
  m2w64-mpfr         conda-forge/win-64::m2w64-mpfr-3.1.4-4
  m2w64-pkg-config   conda-forge/win-64::m2w64-pkg-config-0.29.1-2
  m2w64-toolchain    conda-forge/win-64::m2w64-toolchain-5.3.0-7
  m2w64-toolchain_w~ conda-forge/win-64::m2w64-toolchain_win-64-2.4.0-0
  m2w64-tools-git    conda-forge/win-64::m2w64-tools-git-5.0.0.4592.90b8472-2
  m2w64-windows-def~ conda-forge/win-64::m2w64-windows-default-manifest-6.4-3
  m2w64-winpthreads~ conda-forge/win-64::m2w64-winpthreads-git-5.0.0.4634.697f757-2
  m2w64-zlib         conda-forge/win-64::m2w64-zlib-1.2.8-10
  matplotlib-base    conda-forge/win-64::matplotlib-base-3.5.2-py310h79a7439_0
  minikanren         conda-forge/noarch::minikanren-1.0.3-pyhd8ed1ab_0
  mkl                conda-forge/win-64::mkl-2022.1.0-h6a75c08_874
  mkl-devel          conda-forge/win-64::mkl-devel-2022.1.0-h57928b3_875
  mkl-include        conda-forge/win-64::mkl-include-2022.1.0-h6a75c08_874
  mkl-service        conda-forge/win-64::mkl-service-2.4.0-py310h3d5ec83_0
  msys2-conda-epoch  conda-forge/win-64::msys2-conda-epoch-20160418-1
  multipledispatch   conda-forge/noarch::multipledispatch-0.6.0-py_0
  munkres            conda-forge/noarch::munkres-1.1.4-pyh9f0ad1d_0
  netcdf4            conda-forge/win-64::netcdf4-1.6.0-nompi_py310h5489b47_100
  numpy              conda-forge/win-64::numpy-1.23.0-py310h8a5b91a_0
  openjpeg           conda-forge/win-64::openjpeg-2.4.0-hb211442_1
  openssl            conda-forge/win-64::openssl-3.0.5-h8ffe710_0
  packaging          conda-forge/noarch::packaging-21.3-pyhd8ed1ab_0
  pandas             conda-forge/win-64::pandas-1.4.3-py310hf5e1058_0
  pillow             conda-forge/win-64::pillow-9.2.0-py310h767b3fd_0
  pip                conda-forge/noarch::pip-22.1.2-pyhd8ed1ab_0
  pthread-stubs      conda-forge/win-64::pthread-stubs-0.4-hcd874cb_1001
  pymc               conda-forge/win-64::pymc-4.1.1-py310h5588dad_0
  pymc-base          conda-forge/win-64::pymc-base-4.1.1-py310h5588dad_0
  pyparsing          conda-forge/noarch::pyparsing-3.0.9-pyhd8ed1ab_0
  python             conda-forge/win-64::python-3.10.5-hcf16a7b_0_cpython
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  python_abi         conda-forge/win-64::python_abi-3.10-2_cp310
  pytz               conda-forge/noarch::pytz-2022.1-pyhd8ed1ab_0
  scipy              conda-forge/win-64::scipy-1.8.1-py310h33db832_0
  setuptools         conda-forge/win-64::setuptools-63.1.0-py310h5588dad_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  sqlite             conda-forge/win-64::sqlite-3.39.0-h8ffe710_0
  tbb                conda-forge/win-64::tbb-2021.5.0-h2d74725_1
  tk                 conda-forge/win-64::tk-8.6.12-h8ffe710_0
  toolz              conda-forge/noarch::toolz-0.11.2-pyhd8ed1ab_0
  typing-extensions  conda-forge/noarch::typing-extensions-3.10.0.2-hd8ed1ab_0
  typing_extensions  conda-forge/noarch::typing_extensions-3.10.0.2-pyha770c72_0
  tzdata             conda-forge/noarch::tzdata-2022a-h191b570_0
  ucrt               conda-forge/win-64::ucrt-10.0.20348.0-h57928b3_0
  unicodedata2       conda-forge/win-64::unicodedata2-14.0.0-py310he2412df_1
  vc                 conda-forge/win-64::vc-14.2-hb210afc_6
  vs2015_runtime     conda-forge/win-64::vs2015_runtime-14.29.30037-h902a5da_6
  wheel              conda-forge/noarch::wheel-0.37.1-pyhd8ed1ab_0
  xarray             conda-forge/noarch::xarray-2022.3.0-pyhd8ed1ab_0
  xarray-einstats    conda-forge/noarch::xarray-einstats-0.3.0-pyhd8ed1ab_0
  xorg-libxau        conda-forge/win-64::xorg-libxau-1.0.9-hcd874cb_0
  xorg-libxdmcp      conda-forge/win-64::xorg-libxdmcp-1.1.3-hcd874cb_0
  xz                 conda-forge/win-64::xz-5.2.5-h62dcd97_1
  zipp               conda-forge/noarch::zipp-3.8.0-pyhd8ed1ab_0
  zlib               conda-forge/win-64::zlib-1.2.12-h8ffe710_1
  zstd               conda-forge/win-64::zstd-1.5.2-h6255e5f_2


Proceed ([y]/n)? y


Downloading and Extracting Packages
libpng-1.6.37        | 735 KB    | ############################################################################ | 100%
aeppl-0.0.31         | 5 KB      | ############################################################################ | 100%
fonttools-4.34.2     | 1.6 MB    | ############################################################################ | 100%
openssl-3.0.5        | 7.6 MB    | ############################################################################ | 100%
aeppl-base-0.0.31    | 41 KB     | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test_env_2
#
# To deactivate an active environment, use
#
#     $ conda deactivate


c:\testing\anaconda_2022_05\Scripts>
c:\testing\anaconda_2022_05\Scripts>
c:\testing\anaconda_2022_05\Scripts>
c:\testing\anaconda_2022_05\Scripts>conda activate test_env_2

(test_env_2) c:\testing\anaconda_2022_05\Scripts>python
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:50) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc as pm
>>>

Thanks @nicholasj for the complete console transcript. It looks to me like you’re using the full Anaconda, and that everything is currently in order. (I no longer see the warnings which you originally reported.)

Please let me know if you spot any unexpected warnings in the future. The latest PyMC version 4.1.2 has hopefully solved all the remaining such bugs.

Also, everything should work smoothly with the lightweight Conda distributions like Miniforge and Mambaforge.

1 Like