What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

```[info] stack: gyp verb `which` failed [info] 'Error: not found: python2\n at getNotFoun

giovanni.piemontese
giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
edited January 2020 in Help
[info]    stack:
gyp verb `which` failed
[info]     'Error: not found: python2\n    at getNotFoundError (/data/node_modules/which/which.js:13:12)\n    at F (/data/node_modules/which/which.js:68:19)\n    at E (/data/node_modules/which/which.js:80:29)\n    at /data/node_modules/which/which.js:89:16\n    at /data/node_modules/isexe/index.js:42:5\n    at /data/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',
gyp verb 
[info] `which` failed   code: 'ENOENT' }
gyp
[info]  verb check python checking for Python executable "python" in the PATH

[info] gyp verb
[info]  `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/data/node_modules/which/which.js:13:12)

[info] gyp verb `which` failed
[info]      at F (/data/node_modules/which/which.js:68:19)
gyp verb
[info]  `which` failed     at E (/data/node_modules/which/which.js:80:29)
gyp verb
[info]  `which` failed     at /data/node_modules/which/which.js:89:16
gyp 
[info] verb `which` failed     at /data/node_modules/isexe/index.js:42:5

[info] gyp verb `which` failed     at /data/node_modules/isexe/mode.js:8:5

[info] gyp verb 
[info] `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp
[info]  verb `which` failed  python { Error: not found: python
gyp
[info]  verb `which` failed
[info]      at getNotFoundError (/data/node_modules/which/which.js:13:12)
gyp verb
[info]  `which` failed     at F (/data/node_modules/which/which.js:68:19)
gyp 
[info] verb `which` failed     at E (/data/node_modules/which/which.js:80:29)
gyp
[info]  verb `which` failed     at /data/node_modules/which/which.js:89:16
gyp
[info]  verb `which` failed     at /data/node_modules/isexe/index.js:42:5
gyp
[info]  verb `which` failed
[info]      at /data/node_modules/isexe/mode.js:8:5
gyp verb 
[info] `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb 
[info] `which` failed   stack:
gyp verb
[info]  `which` failed    'Error: not found: python\n    at getNotFoundError (/data/node_modules/which/which.js:13:12)\n    at F (/data/node_modules/which/which.js:68:19)\n    at E (/data/node_modules/which/which.js:80:29)\n    at /data/node_modules/which/which.js:89:16\n    at /data/node_modules/isexe/index.js:42:5\n    at /data/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',
gyp verb
[info]  `which` failed   code: 'ENOENT' }

[info] gyp
[info]  ERR!
[info]  configure error 

[info] gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

[info] gyp ERR! stack     at PythonFinder.failNoPython (/data/node_modules/node-gyp/lib/configure.js:484:19)
gyp
[info]  ERR! stack     at PythonFinder.<anonymous> (/data/node_modules/node-gyp/lib/configure.js:406:16)

[info] gyp ERR! stack     at F (/data/node_modules/which/which.js:68:16)
gyp
[info]  ERR! stack     at E (/data/node_modules/which/which.js:80:29)

[info] gyp ERR! stack     at /data/node_modules/which/which.js:89:16

[info] gyp ERR! stack     at /data/node_modules/isexe/index.js:42:5

[info] gyp ERR! stack
[info]      at /data/node_modules/isexe/mode.js:8:5
gyp ERR! stack
[info]      at FSReqWrap.oncomplete (fs.js:154:21)

[info] gyp ERR!
[info]  System Linux 4.9.184-linuxkit

[info] gyp ERR! command
[info]  "/usr/bin/node" "/data/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! 
[info] cwd /data/node_modules/node-sass
gyp ERR!
[info]  node -v v10.14.2
gyp
[info]  ERR! node-gyp -v v3.8.0

[info] gyp ERR! not ok 

[info] Build failed with error code: 1

[info] npm ERR! code ELIFECYCLE

[info] npm ERR! errno 1

[info] npm ERR! node-sass@4.13.1 postinstall: `node scripts/build.js`
npm
[info]  ERR! Exit status 1

[info] npm ERR! 
npm
[info]  ERR! Failed at the node-sass@4.13.1 postinstall script.
npm
[info]  ERR! This is probably not a problem with npm. There is likely additional logging output above.

[info] 
npm 
[info] ERR! A complete log of this run can be found in:
npm ERR!     /home/spryker/.npm/_logs/2020-01-16T15_14_54_704Z-debug.log

@UN6T8SEM7 or someone else any idea?

p.s.: i used latest spryker/docker-sdk release too.

Comments

  • At first glance it looks like Python needs to be added to the docker image. Can you add it to the support portal so we can track it as a bug?

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    @UKBSZ8M8W yes i can. But i can solve now the problem instead to wait until the bug will be fixed? Any idea?

  • I haven't worked on our docker/sdk but in general:
    you need to add the command to install python to the Dockerfile you end up using, then rebuild the image.

  • Unknown
    edited January 2020

    I haven't tested this but something like:

    In your project root add spryker_python.Dockerfile

    FROM spryker/php:7.2
    USER root
    RUN apt-get install python
    

    Then edit your deploy.dev.yml and change the key image to indicate spryker-python instead of the normal PHP image.

    You'll have to build the python image docker build -t spryker-python -f spryker_python.Dockerfile

    Then you in theory can boot the dev env

    docker/sdk bootstrap deploy.dev.yml -p spryker-dev-with-python
    docker/sdk up deploy.dev.yml

    Again it isn't tested and I haven't worked on it before, but this is the general direction you ~need to~ can take.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    OK, thanks. i will try today or tomorrow..