WARNING: g++ not detected

I just installed pymc on my Mac (Intel chip, running macOS Monterey) via the recommended command:

conda create -c conda-forge -n pymc_env "pymc>=4"

However, when I run import pymc as pm in my pymc_env conda environment, I get the following warning message:

(pymc_env) cameron@Camerons-MBP:~$ python
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:09:13) [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc as pm
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

I see that there is an open thread about that warning, but no solution was discovered. Oddly enough, if I run import pymc as pm in the integrated Python REPL in VS Code, I get an additional warning about g++:

(pymc_env) cameron@Camerons-MBP:~/projects/pymc_experiments$ /Users/cameron/opt/anaconda3/envs/pymc_env/bin/python
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:09:13) [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import pymc as pm
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.

Any ideas what might be going on? Do I need to worry about g++ not being detected?

Hi @CameronBieganek, thanks so much for taking the time to report this bug. At first glance, it looks to me like you’re doing everything correctly.

I’d really like to get this solved for you and others, so if you have the time, would you please fill out a bug report at “GitHub - conda-forge/pymc-feedstock: A conda-smithy repository for pymc.”? By filling out the template I’ll receive the information I need in order to look more deeply into this. Thanks!

3 Likes

I managed to accidentally resolve this issue. I recently updated my operating system from an old version of macOS to the new macOS Monterrey. I was occasionally getting what seemed like an unrelated error when using the terminal (not the python REPL):

xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun
at: /Library/Developer/CommandLineTools/usr/bin/xcrun

I was able to resolve that by running xcode-select --install in the terminal, as described in these two posts:

Now that I installed xcode-select, I no longer see the warnings from pymc mentioned in my original post. I think I had Xcode installed before I upgraded the OS on my laptop, but I guess the upgrade process affected that.

1 Like