Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING (aesara.configdefaults) when importing penaltyblog #13

Open
nachimbol opened this issue Apr 17, 2024 · 2 comments
Open

WARNING (aesara.configdefaults) when importing penaltyblog #13

nachimbol opened this issue Apr 17, 2024 · 2 comments

Comments

@nachimbol
Copy link

I'm quite desperate. I'm trying to work with this library, but after installing it, just importing the library launches this error. What can I do? Any guesses?
This is the code:

import sys
sys.path.append("../")

import penaltyblog as pb

This is the error:

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.
Traceback (most recent call last):
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\configparser.py", line 237, in fetch_val_for_key
return self._aesara_cfg.get(section, option)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\OneDrive - Consejería de Educación, Cultura y Deportes Castilla La-Mancha\Escritorio\Modeling.conda\Lib\configparser.py", line
797, in get
d = self._unify_values(section, vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\OneDrive - Consejería de Educación, Cultura y Deportes Castilla La-Mancha\Escritorio\Modeling.conda\Lib\configparser.py", line
1168, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\configparser.py", line 353, in get
val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\configparser.py", line 241, in fetch_val_for_key
raise KeyError(key)
KeyError: 'blas__ldflags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\penaltyblog_init_.py", line 1, in
from . import ( # noqa
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\penaltyblog\models_init_.py", line 1, in
from .bayesian_bivariate import BayesianBivariateGoalModel # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\penaltyblog\models\bayesian_bivariate.py", line 4, in
import aesara.tensor as tt
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara_init_.py", line 120, in
from aesara import scalar, tensor
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\tensor_init_.py", line 105, in
from aesara.tensor import ( # noqa
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\tensor\blas.py", line 162, in
from aesara.tensor.blas_headers import blas_header_text, blas_header_version
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\tensor\blas_headers.py", line 1015, in
if not config.blas__ldflags:
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\configparser.py", line 357, in get
val_str = self.default()
^^^^^^^^^^^^^^
File "C:\Users\ASUS ROG\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aesara\link\c\cmodule.py", line 2711, in default_blas_ldflags
blas_info = np.config.get_info("blas_opt")
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'numpy.config' has no attribute 'get_info'

Just importing penaltyblog is enough to the error to appear, I don't know what to do or how to deal with it.

@martineastwood
Copy link
Owner

Hello - sounds like this is a problem with version mismatches on your system rather than a problem with penaltyblog. pymc has some quite strict dependencies and you need to make sure you have the correct version of numpy so I'd suggest starting off by creating a new virtual environment and installing penaltyblog into that.

@bytesemantics
Copy link

Had this issue myself today. Resolved by install aesara with latest version. (i.e. once penaltyblog installed, I manually ran pip install aesara --upgrade)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants