IBM Support

IBM Sterling Store Engagement (Next-generation) customization local setup error - "Npm ERR! gyp ERR! find Python"

Troubleshooting


Problem

1) Encountered 'find Python' error while yarn bootstrap command is running in local setup for IBM Sterling Store Engagement (Next-generation) source code.
2) Error occurred in step 8 of the documentation: Setting up a local instance

Symptom

Error Details:
Npm ERR! gyp verb find Python is not set from command line or npm configuration
Npm ERR! gyp verb find Python is not set from environment variable PYTHON
Npm ERR! gyp verb find Python checking if "python3" can be used
Npm ERR! gyp verb find Python - executing "python3" to get executable path
Npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
Npm ERR! gyp ERR! find Python
Npm ERR! gyp ERR! find Python **********************************************************
Npm ERR! gyp ERR! find Python You need to install the latest version of Python.
Npm ERR! gyp ERR! find Python Node-gyp be able to find and use Python. If not,
Npm ERR! gyp ERR! find Python that you can try one of the following options:
Npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
Npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
Npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
Npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
Npm ERR! gyp ERR! find Python **********************************************************
Npm ERR! gyp ERR! find Python
Npm ERR! gyp ERR! configure error
Npm ERR! gyp ERR! Stack Error: Could not find any Python installation to use
Npm ERR! gyp ERR! Stack at ChildProcess.errorhandler (node:child_process:418:5)
Npm ERR! gyp ERR! System Darwin 22.6.0
Npm ERR! gyp ERR! Command "/usr/local/bin/node" "/Users/mnt001/store-frontend-src/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
Npm ERR! gyp ERR! /Users/mnt001/store-frontend-src/packages/libs/styles/node_modules/node-sass
Npm ERR! gyp ERR! node -v v16.14.0
Npm ERR! gyp ERR! node-gyp -v v8.4.1
Npm ERR! Build failed with error code: 1

Resolving The Problem

Possible solutions to resolve this error:
Solution 1:
1) Run the command 'npm install -g node-gyp' from store-temp folder.
2) Run yarn bootstrap command from store-temp folder.
Solution 2:
1) Installation of python in the local machine.
2) Set the environment variables.
3) Run yarn bootstrap command from store-temp folder.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"ARM Category":[{"code":"a8m0z000000cxzVAAQ","label":"Call Center Store and SIM"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
15 December 2023

UID

ibm17060278