Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails if 'python' not rebound to 'python3' #338

Open
then4p opened this issue Jun 5, 2023 · 0 comments
Open

Installation fails if 'python' not rebound to 'python3' #338

then4p opened this issue Jun 5, 2023 · 0 comments

Comments

@then4p
Copy link

then4p commented Jun 5, 2023

Tried on macOS Ventura 13.4 with M1 Pro.

I installed npm via homebrew and have Python setup via pyenv.

npm version: 9.6.6, node version: 20.2.0

Log excerpt:

npm ERR! path /opt/homebrew/lib/node_modules/moro/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/20.2.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@20.2.0 | darwin | arm64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v115-darwin-arm64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v115-darwin-arm64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v115-darwin-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.1.1 and node@20.2.0 (node-v115 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v115-darwin-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@20.2.0 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@20.2.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v20.2.0/node-v20.2.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.2.0/node-v20.2.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v20.2.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.2.0/SHASUMS256.txt
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/user/Library/Caches/node-gyp/20.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/user/Library/Caches/node-gyp/20.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/user/Library/Caches/node-gyp/20.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@20.2.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! pyenv: python: command not found
npm ERR! 
npm ERR! The `python' command exists in these Python versions:
npm ERR!   3.9.5
npm ERR!   3.9.16
npm ERR!   3.10.11
npm ERR!   3.11.3
npm ERR! 
npm ERR! Note: See 'pyenv help global' for tips on allowing both
npm ERR!       python2 and python3 to be found.
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.5.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.2.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
npm ERR! gyp ERR! cwd /opt/homebrew/lib/node_modules/moro/node_modules/sqlite3
npm ERR! gyp ERR! node -v v20.2.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/20.2.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/opt/homebrew/lib/node_modules/moro/node_modules/sqlite3/lib/binding/node-v115-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/moro/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Darwin 22.5.0
npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/20.2.0/bin/node" "/opt/homebrew/lib/node_modules/moro/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /opt/homebrew/lib/node_modules/moro/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v20.2.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

Running the install after setting the pyenv shell to 3.9.16 worked. Maybe there is something that needs to be updated in the installation process? Alternatively a python binding should be a requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant