Numpy example issue
See original GitHub issueThanks for creating deno_python. I tried to run NumPy example but faced this issue. Could you help me to resolve this issue?
error: Uncaught (in promise) PythonError:
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.8 from "/usr/local/bin/deno"
* The NumPy version is: "1.22.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(/usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 2): Symbol not found: _PyBaseObject_Type
Referenced from: /usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so
Expected in: flat namespace
in /usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so
Traceback:
[' File "/usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/__init__.py", line 144, in <module>\n from . import core\n', ' File "/usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/__init__.py", line 49, in <module>\n raise ImportError(msg)\n']
throw new PythonError(errorMessage);
^
at maybeThrowError (https://deno.land/x/python@0.1.0/src/python.ts:641:9)
at Python.importObject (https://deno.land/x/python@0.1.0/src/python.ts:717:7)
at Python.import (https://deno.land/x/python@0.1.0/src/python.ts:727:17)
at file:///Users/hoangpq/WebstormProjects/deno-working/server.ts:3:25
But working well on Python REPL
Environment: OS: macOS Python version: 3.8 (Homebrew) Deno version: 1.18.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Issues · numpy/numpy - GitHub
The fundamental package for scientific computing with Python. - Issues · numpy/numpy.
Read more >NumPy Practice Problems (Solutions Explained) - YouTube
Collection of NumPy practice problems taken from my comprehensive course on NumPy (link below). Problems are ordered in increasing ...
Read more >Python NumPy - Practice Exercises, Questions, and Solutions
Questions on NumPy Statistics · Compute the median of the flattened NumPy array · Find Mean of a List of Numpy Array ·...
Read more >NumPy Tutorial: A Simple Example-Based Guide - Stack Abuse
The NumPy library is a popular Python library used for scientific computing applications, and is an acronym for "Numerical Python".
Read more >NumPy quickstart — NumPy v1.24 Manual
It demonstrates how n-dimensional ( n >= 2 ) arrays are represented and can be manipulated. In particular, if you don't know how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That is quite weird. I will have to debug this locally so I need some more time, sorry 😅
Tested on macOS Big Sur, Python 3.8, Deno 1.18.0, deno_python 0.1.1
Thanks for your help 🥇