icelam / random-name-picker

Simple HTML5 random name picker for picking lucky draw winner using Web Animations and AudioContext API.

Home Page:https://pinkylam.me/playground/random-name-picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python not found exception due to node-sass and node-gyp on Windows

alttabforfun opened this issue · comments

hi im new to this, i try to install in windows 10, does this need python? cuz when i try to yarn install it gave me error :

error D:\Downloads\Compressed\random-name-picker-master\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: D:\Downloads\Compressed\random-name-picker-master\node_modules\node-sass
Output:
Building: D:\Program Files\nodejs\node.exe D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'D:\Program Files\nodejs\node.exe',
gyp verb cli 'D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\bin\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@8.4.1
gyp info using node@18.17.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - "python" is not in PATH or produced an error
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python39\python.exe
gyp verb find Python - executing "C:\Program Files\Python39\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python39-32\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python38\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python38\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python38\python.exe
gyp verb find Python - executing "C:\Program Files\Python38\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python38-32\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python37\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python37\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python37\python.exe
gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python36\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python36\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python36\python.exe
gyp verb find Python - executing "C:\Program Files\Python36\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python36-32\python.exe
gyp verb find Python - executing "C:\Users\PC\AppData\Local\Programs\Python\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp verb find Python checking if the py launcher can be used to find Python 3
gyp verb find Python - executing "py.exe" to get Python 3 executable path
gyp verb find Python - "py.exe" is not in PATH or produced an error
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 "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
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 Python is C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python39-32\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python38\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python38-32\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python37\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python36\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\PC\AppData\Local\Programs\Python\Python36-32\python.exe
gyp ERR! find Python - "C:\Users\PC\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if the py launcher can be used to find Python 3
gyp ERR! find Python - "py.exe" 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="C:\Path\To\python.exe"
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 "C:\Path\To\python.exe"
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
gyp ERR! stack at PythonFinder.fail (D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\lib\find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\lib\find-python.js:159:21)
gyp ERR! stack at PythonFinder. (D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\lib\find-python.js:228:18)
gyp ERR! stack at PythonFinder.execFileCallback (D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\lib\find-python.js:294:16)
gyp ERR! stack at exithandler (node:child_process:427:5)
gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)
gyp ERR! stack at ChildProcess.emit (node:events:514:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Downloads\Compressed\random-name-picker-master\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\Downloads\Compressed\random-name-picker-master\node_modules\node-sass
gyp ERR! node -v v18.17.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok

Hi @alttabforfun, thank you for providing such a detailed log. It has been instrumental in identifying the root cause of the issue.

I am using a Mac machine for development and Python is pre-installed on macOS. Which is why I haven't encountered this issue before. Based on your log, it seems that the problem lies with the node-sass dependency, which is used for processing SCSS files into standard CSS. node-sass relies on node-gyp, which in turn requires Python and Visual C++ Build Environment to be installed.

To install Python and the necessary build environment, please refer to the node-gyp documentation. You can find more information and detailed instructions in the following link: https://github.com/nodejs/node-gyp?tab=readme-ov-file#on-windows. Once you have installed Python and the required build environment, you should be able to resolve the issue.

If you have any further questions or need additional assistance, please don't hesitate to ask.