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.
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]
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.
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.