fridgerator / PyNode

Node - Python Interop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dyld: lazy symbol binding failed: Symbol not found: _Py_IsInitialized - Node v14

vjpr opened this issue · comments

I'm getting this error when running the example from the readme:

macOS 10.15.3
pnpm package manager
Node 14.2.0

dyld: lazy symbol binding failed: Symbol not found: _Py_IsInitialized
  Referenced from: /foo/node_modules/.pnpm/@fridgerator/pynode@0.4.6/node_modules/@fridgerator/pynode/build/Release/PyNode.node
  Expected in: flat namespace

dyld: Symbol not found: _Py_IsInitialized
  Referenced from: /foo/node_modules/.pnpm/@fridgerator/pynode@0.4.6/node_modules/@fridgerator/pynode/build/Release/PyNode.node
  Expected in: flat namespace

Had to add the absolute path to my libpython library that was installed with Homebrew. Using python from pyenv doesn't always install the shared library.

  pynode.dlOpen('/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib')