cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

node-gyp rebuild: no Python installation

alec_treutler
Explorer
6,756

Hi All,

I am having trouble following the OpenSAP course "Building Applications with SAP Cloud Application Programming Model". I am currently using a trial SCP account. The problem occurs when trying to use:

cds deploy --to hana

but the issue occurs on

node-gyp rebuild

The error reads:

gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use

using python --version shows only bash: python: command not found

Can anyone either tell me how to force deployment while ignoring python installations or how to install python in the cloud environment?

Thank you for your help!

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi alec.treutler,

Apparently you have updated your NodeJS to version 12 with nvm on SAP Business Application Studio. However, after updating the NodeJS version, you should also update npm to version 7. Please try updating the npm with the following command:

npm -g install npm@7.6.3

Best regards,
Ivan