Giter Club home page Giter Club logo

Comments (4)

michaelweinold avatar michaelweinold commented on July 22, 2024

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
microsoft/vscode-jupyter#9157 --> solution not applicable to brightway

from brightway2.

michaelweinold avatar michaelweinold commented on July 22, 2024

Force removing

pyparadiso
mkl

as documented in LCA-ActivityBrowser/activity-browser#705 (comment) 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 numpy/numpy#12970 does not resolve the error.

from brightway2.

michaelweinold avatar michaelweinold commented on July 22, 2024

Related: efforts to release platform specific conda packages (pypardiso solver for Win platform, umfpack solver for macOS ARM64 platform):

#47
cmutel/conda-recipes#6

from brightway2.

cmutel avatar cmutel commented on July 22, 2024

Should be fixed with _nosolver conda packages.

from brightway2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.