Exception: ('Compilation failed (return status=1)... error after installing PyMC3 for the first time (original) (raw)

December 24, 2022, 9:33pm 16

Greetings all,

I’m having the same issue. However, the only difference is that no issue when running conda environment on macOS terminal, yet it produces the same issue stated above on any IDE, like pycharm etc. Anyone find any solution?

with model.backend.model:
    idata=pm.sampling_jax.sample_numpyro_nuts(draws= 2500, tune = 100, target_accept = .99, postprocessing_backend = 'cpu')
    posterior_predictive = pm.sample_posterior_predictive(trace = idata, extend_inferencedata=True)
You can find the C code in this temporary file: /var/folders/jj/t5457kfd45zg1p3m5gnvp3580000gn/T/aesara_compilation_error_k6_sv7lq
Traceback (most recent call last):
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/vm.py", line 1246, in make_all
    node.op.make_thunk(node, storage_map, compute_map, [], impl=impl)
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/op.py", line 131, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/op.py", line 96, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/basic.py", line 1202, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/basic.py", line 1122, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/basic.py", line 1647, in cthunk_factory
    module = cache.module_from_key(key=key, lnk=self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/cmodule.py", line 1229, in module_from_key
    module = lnk.compile_cmodule(location)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/basic.py", line 1546, in compile_cmodule
    module = c_compiler.compile_str(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/cmodule.py", line 2640, in compile_str
    raise CompileError(
aesara.link.c.exceptions.CompileError: Compilation failed (return status=1):
/Users/fatihbozdag/opt/anaconda3/envs/tools/bin/clang++ -dynamiclib -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -fPIC -undefined dynamic_lookup -I/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/numpy/core/include -I/Users/fatihbozdag/opt/anaconda3/envs/tools/include/python3.11 -I/Users/fatihbozdag/opt/anaconda3/envs/tools/lib/python3.11/site-packages/aesara/link/c/c_code -L/Users/fatihbozdag/opt/anaconda3/envs/tools/lib -fvisibility=hidden -o /Users/fatihbozdag/.aesara/compiledir_macOS-13.1-arm64-arm-64bit-arm-3.11.0-64/tmpvkqzlpe7/mf31361ca627aa70a34ba69d9c3a6724ab1a9973de86698a670254c65a40b8387.so /Users/fatihbozdag/.aesara/compiledir_macOS-13.1-arm64-arm-64bit-arm-3.11.0-64/tmpvkqzlpe7/mod.cpp
In file included from /Users/fatihbozdag/.aesara/compiledir_macOS-13.1-arm64-arm-64bit-arm-3.11.0-64/tmpvkqzlpe7/mod.cpp:1:
In file included from /Users/fatihbozdag/opt/anaconda3/envs/tools/include/python3.11/Python.h:23:
/Users/fatihbozdag/opt/anaconda3/envs/tools/bin/../include/c++/v1/stdlib.h:93:15: fatal error: 'stdlib.h' file not found
#include_next <stdlib.h>