Cerebro: Try to use python3

Created on 11 May 2018  路  5Comments  路  Source: cerebroapp/cerebro

  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • [x] I am on the latest Cerebro.app version
  • OS version and name: Fedora 28
  • Cerebro.app version: 0.3.2
  • Relevant information from devtools _(See above how to open it)_: N/A

Issue

Hello, I tried to build this great job on my Fedora 28. Then I found that it used some module relied on python 2 which is almost some out of date.

Hope it can be better and better! Thank you!

Most helpful comment

So I took a look at the node-gyp github page, and it does appear that it does not support any Python 3.x versions: https://github.com/nodejs/node-gyp#on-unix

My recommendation would be to open an issue on their github about this, as this package only uses node-gyp and doesn't have much control over that codebase :)

All 5 comments

What module are you referring to that is using Python 2?

Just FYI, as far as I'm aware (and I'm not the author but an extremely heavy user of Cerebro), there is no Python code anywhere in the Cerebro codebase. There may be dependencies which may have some python code (the only thing I can think of that might have any python would be something to do with electron), but if that is the case, you might want to find the repository for that dependency and make an issue there instead :)

It seems that gyp is still using Python 2. When I executed yarn in ./app I got an error.

Here is the output message, hope it can help you. :)

Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp ERR! configure error 
gyp ERR! stack Error: Python executable "/usr/bin/python" is v3.6.5, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/configure.js:474:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Linux 4.16.7-300.fc28.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/yuetongyu/b/cerebro/app/node_modules/ref

So I took a look at the node-gyp github page, and it does appear that it does not support any Python 3.x versions: https://github.com/nodejs/node-gyp#on-unix

My recommendation would be to open an issue on their github about this, as this package only uses node-gyp and doesn't have much control over that codebase :)

I have been get similar error on Win10 using node version 10.15.2 and python2 (or python3). Was able to run yarn install successfully with yarn installed globally using node version 8.15.1 (installed using NVM) and PYTHON environment variable set to python2 executable location.

This error was happening due to an old dependency, I believe it has already been resolved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xomikronx picture xomikronx  路  5Comments

rafa-acioly picture rafa-acioly  路  6Comments

andylima picture andylima  路  6Comments

mijoharas picture mijoharas  路  3Comments

helmutgranda picture helmutgranda  路  4Comments