Closed michaelweinold closed 2 years ago
The issue occurs in both the browser-based notebook and VS Code.
Simple printing commands like
print("hello world")
work fine.
Some package imports, such as
import jinja2
import tornado
import tabulate
work fine.
Package imports that kill the kernel:
numpy
pandas
brightway2
Similar log outputs: https://stackoverflow.com/q/71994235 --> confirmed this is not a memory issue https://github.com/microsoft/vscode-jupyter/issues/9157 --> solution not applicable to brightway
Force removing
pyparadiso
mkl
as documented in https://github.com/LCA-ActivityBrowser/activity-browser/issues/705#issuecomment-1032446633 no longer makes the kernel crash. Instead, the following error is thrown:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Users/michaelweinold/github/phd_brightway_sandbox/test.ipynb Cell 4 in <cell line: 1>()
----> 1 import pandas as pd
File /opt/miniconda3/envs/bw_rosetta/lib/python3.9/site-packages/pandas/__init__.py:16, in <module>
13 missing_dependencies.append(f"{dependency}: {e}")
15 if missing_dependencies:
---> 16 raise ImportError(
17 "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
18 )
19 del hard_dependencies, dependency, missing_dependencies
21 # numpy compat
ImportError: Unable to import required dependencies:
numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.9 from "/opt/miniconda3/envs/bw_rosetta/bin/python"
* The NumPy version is: "1.23.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen(/opt/miniconda3/envs/bw_rosetta/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libcblas.3.dylib
Referenced from: /opt/miniconda3/envs/bw_rosetta/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so
Reason: tried: '/opt/miniconda3/envs/bw_rosetta/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/opt/miniconda3/envs/bw_rosetta/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/opt/miniconda3/envs/bw_rosetta/bin/../lib/libcblas.3.dylib' (no such file), '/opt/miniconda3/envs/bw_rosetta/bin/../lib/libcblas.3.dylib' (no such file), '/usr/local/lib/libcblas.3.dylib' (no such file), '/usr/lib/libcblas.3.dylib' (no such file)
The resolution suggested in https://github.com/numpy/numpy/issues/12970 does not resolve the error.
Related: efforts to release platform specific conda packages (pypardiso solver for Win platform, umfpack solver for macOS ARM64 platform):
https://github.com/brightway-lca/brightway2/issues/47 https://github.com/cmutel/conda-recipes/issues/6
Should be fixed with _nosolver conda packages.
Following the installation instructions (tried both "Quickstart" and "Installation on Mac M1"), my kernel dies when importing any package:
returns
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details.
The logs read
System: macOS Monterey, 12.4 (21F79) conda 4.13.0