Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install/update Hydrogen in Atom v1.40.0 #1738

Closed
bjce opened this issue Aug 13, 2019 · 38 comments
Closed

Unable to install/update Hydrogen in Atom v1.40.0 #1738

bjce opened this issue Aug 13, 2019 · 38 comments

Comments

@bjce
Copy link

bjce commented Aug 13, 2019

Atom 1.40.0
Windows 10
Hydrogen 2.8.0

I tried to launch Atom, but a red bug appeared with the following message regarding Hydrogen 2.8.0:

Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom.

with the following Details:

gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "C:\Users\usernumb...\AppData\Local\Programs\Python\Python37-32\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\i0310451\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\usernumb...\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack     at C:\Users\usernumb...\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:182:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\usernumb...\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\usernumb...\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\usernumb...\.atom\packages\Hydrogen\node_modules\zeromq
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\usernumb...\.atom\.apm\_logs\2019-08-13T15_38_58_222Z-debug.log

What I tried:

  • I tried several times to "Rebuild Packages", but the same error message occurs.
  • As it's my PC at work, and it is behind a firewall, I tried the same procedure but connecting to internet through my cellphone, but it didn't work

I saw 2 similar issures: #308 , #11, but I could not solve the problem

I then tried to upgrade Hydrogen 2.8 to 2.10 but got a similar error message

> zeromq@5.1.0 install C:\Users\i0310451\AppData\Local\Temp\apm-install-dir-119713-12668-c50abk.h3je5\node_modules\Hydrogen\node_modules\zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)


prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=node arch=x64 platform=win32)

Downloading libzmq for Windows
Download finished

C:\Users\i0310451\AppData\Local\Temp\apm-install-dir-119713-12668-c50abk.h3je5\node_modules\Hydrogen\node_modules\zeromq>if not defined npm_config_node_gyp (node "C:\Users\i0310451\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\i0310451\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 

gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "C:\Users\usernumb...\AppData\Local\Programs\Python\Python37-32\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\usernumb...\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\usernumb...\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack     at C:\Users\i0310451\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:182:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\i0310451\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\i0310451\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\i0310451\AppData\Local\Temp\apm-install-dir-119713-12668-c50abk.h3je5\node_modules\Hydrogen\node_modules\zeromq
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\i0310451\AppData\Local\Temp\apm-install-dir-119713-12668-c50abk.h3je5\package.json'
npm WARN react-rangeslider@2.2.0 requires a peer of react@^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN vega-themes@2.3.2 requires a peer of vega@* but none is installed. You must install peer dependencies yourself.
npm WARN vega-lite@3.4.0 requires a peer of vega@^5.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN apm-install-dir-119713-12668-c50abk.h3je5 No description
npm WARN apm-install-dir-119713-12668-c50abk.h3je5 No repository field.
npm WARN apm-install-dir-119713-12668-c50abk.h3je5 No README data
npm WARN apm-install-dir-119713-12668-c50abk.h3je5 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\usernumb...\.atom\.apm\_logs\2019-08-13T20_45_06_653Z-debug.log

I posted a similiar issue for Atom #19780 but i ve been told that this was probably related to Hydrogen

@bjce bjce added the bug 🐛 For unexpected issues label Aug 13, 2019
@wadethestealth
Copy link
Member

You have to use python 2 for zeromq installation. Here it is trying to find your python 3 file

@bjce
Copy link
Author

bjce commented Aug 13, 2019

thank you @wadethestealth. So I have to install python 2 and link its path? what do you advise me to do exactly?

@wadethestealth
Copy link
Member

Most likely exact what you said then reinstall

@bjce
Copy link
Author

bjce commented Aug 13, 2019

so install python 2 and link path?

@wadethestealth
Copy link
Member

Yes hopefully that gives no issues

@bjce
Copy link
Author

bjce commented Aug 13, 2019

many thanks @wadethestealth. just one more comment, I'm going to try to do that, but python 2 as far as I know is going to go "end of life" en 2019. you are Saying that Atom depends on python 2 to install new packages? or is it only hydrogen?

@aviatesk
Copy link
Member

Saying that Atom depends on python 2 to install new packages? or is it only hydrogen?

AFAIU, the error seems to be caused by your firewall stuff, i.e.: downloading prebuild-binaries of the Hydrogen dependency fails because of that.
Since your environment doesn't allow you to download them, you end up building them as a fallback, and the building needs Python 2, maybe.
(You may need some additional setups for that other than Python 2)

I've not dug into what zeromq is really doing here, thus sorry if I'm saying something wrong.

@wadethestealth
Copy link
Member

I don't believe there are any zeromq prebuilts for windows. To build zeromq, which is our dependency, they use node gyp to build binaries on install. However the pit fall is all the requirements of node gyp (Python 2) being one of them. Atom does not have any relation to this issue. It is simply the fact that node gyp doesn't support python 3 which is what zeromq uses. The other problem being I believe that there aren't any prebuilts for zeromq. We can only hope that node gyp gets updated to use python 3. https://github.com/nodejs/node-gyp/blob/master/README.md you can see more in their install instructions.

@wadethestealth wadethestealth added install windows and removed bug 🐛 For unexpected issues labels Aug 14, 2019
@bjce
Copy link
Author

bjce commented Aug 14, 2019

Ok many thanks for your Explanation @wadethestealth. I installed python 2.7 and added it to my path. But now I got this other error message:

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: tunneling socket could not be established, statusCode=407
gyp ERR! stack     at ClientRequest.onConnect (C:\Users\i0310451\AppData\Local\atom\app-1.40.0\resources\app\apm\node_modules\npm\node_modules\tunnel-agent\index.js:166:19)
gyp ERR! stack     at Object.onceWrapper (events.js:273:13)
gyp ERR! stack     at ClientRequest.emit (events.js:182:13)
gyp ERR! stack     at Socket.socketOnData (_http_client.js:465:11)
gyp ERR! stack     at Socket.emit (events.js:182:13)
gyp ERR! stack     at addChunk (_stream_readable.js:279:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:264:11)
gyp ERR! stack     at Socket.Readable.push (_stream_readable.js:219:10)
gyp ERR! stack     at TCP.onread (net.js:636:20)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\numbuser...\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\numbuser...\\AppData\\Local\\atom\\app-1.40.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\numbuser...\.atom\packages\Hydrogen\node_modules\zeromq
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\numbuser...\.atom\.apm\_logs\2019-08-14T06_31_10_274Z-debug.log

@aviatesk
Copy link
Member

@wadethestealth
Wait, then why our docs don't list Python 2 as a prerequisite ?
(I just want to know why zeromq is required to be built only in some cases.)

@n-riesco
Maybe would you know this issue for details ?

@wadethestealth
Copy link
Member

@aviatesk I have no idea what to make of this but maybe there are prebuilts. Read zeromq README

@fohria
Copy link

fohria commented Aug 14, 2019

I had the same error as top post. This on Atom 1.40.0 and Mac OS 10.14.

Python2 is/should be installed on Mac OS by default, but may have to be called with "python2" instead of "python" which usually defaults to python3 these days.

So I managed to fix the issue by editing a script with same procedure as mentioned here: platformio/platformio-atom-ide-terminal#707 (comment)

@BenRussert
Copy link
Member

I'm getting the same error on windows after upgrading to atom to 1.40. I did not have this problem previously, but now node gyp says it cant find my python exe. I have not installed python 2 previously, I guess I assumed apm handled that somehow.

When I have time, I might try installing python 2 and setting PYTHON env variable like the log suggests.

https://gist.github.com/BenRussert/b8f25caf90a8955a425a8024e9e9f645

@BenRussert
Copy link
Member

I had the same error as top post. This on Atom 1.40.0 and Mac OS 10.14.

Python2 is/should be installed on Mac OS by default, but may have to be called with "python2" instead of "python" which usually defaults to python3 these days.

So I managed to fix the issue by editing a script with same procedure as mentioned here: platformio/platformio-atom-ide-terminal#707 (comment)

I've seen this solution before when there are python 2 vs 3 issues. It's so user unfriendly that I have to wonder if theres a better way.

@BenRussert
Copy link
Member

If anyone has tried atom 1.38.x or 1.39.x and it did or didnt work that would be useful to know. I didn't have this problem before upgrading to 1.40.

@tlcaputi
Copy link

I just tried installing atom 1.39.1 and it works!

apm  2.2.4
npm  6.2.0
node 8.9.3 x64
atom 1.39.1
python 3.7.4
git 2.22.0.windows.1
visual studio

@wadethestealth
Copy link
Member

wadethestealth commented Aug 14, 2019

@BenRussert maybe the upgrade to electron 4 in 1.40 is a problem here

@BenRussert
Copy link
Member

@BenRussert maybe the upgrade to electron 4 in 1.40 is a problem here

I think you are on to something there @wadethestealth.

You might want to comment here: atom/atom#19780.

@aviatesk
Copy link
Member

Umm, v1.40.0 still uses electron 3.1.10, which is the same version as v1.39. electron 4 will be introduced in v1.41.0.

@wadethestealth
Copy link
Member

Oops Yeah I see that now @aviatesk

@wadethestealth
Copy link
Member

wadethestealth commented Aug 14, 2019

I don't know maybe it's just firewall related if it can't access the binaries.

@aviatesk
Copy link
Member

aviatesk commented Aug 15, 2019

I gonna pin this issue since lots of users are facing this issue after updating to Atom v1.40.0.
Please watch atom/atom#19780 if you want to see upstream fixes.

The temporary fix is just to downgrade Atom to before v1.39.1:

  • Turn off Automatically Update via Settings -> Core
  • Uninstall Atom
  • Install Atom v1.39.1 or before from https://github.com/atom/atom/releases
  • Install Hydrogen (The latest version is compatible Atom after v1.28.0)

@aviatesk aviatesk pinned this issue Aug 15, 2019
@aviatesk aviatesk changed the title Trying to upgrade from Hydrogen 2.8 to 2.10: "Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom" Unable to install/update Hydrogen in Atom v1.40.0 Aug 15, 2019
@wadethestealth
Copy link
Member

wadethestealth commented Aug 15, 2019

@BenRussert @aviatesk We should see if this is related in any way.
atom/atom#19482 is mentioned as a changed from 1.39 to 1.40 in the releases, which directly links to atom/apm#845.

@aviatesk
Copy link
Member

@wadethestealth Seems really related. I will mention that in the issue in atom/atom.

@aviatesk
Copy link
Member

Okay this issue would be fixed when atom/apm#862 is merged and the new version of Atom is released.
And this can be a quick fix before that.

We may need to bump the compatible Atom version in the next release though.

@wadethestealth
Copy link
Member

@aviatesk @BenRussert I don't have a problem bumping our supported version, but an alternative may be to add to troubleshooting guide for version 1.40

@mcguffie
Copy link

I also ran into problems running/installing Hydrogen on Atom 1.4 on a macOS machine. I downgraded Atom to 1.39.1 per this thread and tried to reinstall Hydrogen. I received the same error as before:

configure: error: C compiler cannot create executables
See `config.log' for more details
child process exited with code 77
gyp ERR! configure error 
gyp ERR! stack Error: Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" is v3.6.8, 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 (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:501:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:282:7)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:380:11)
gyp ERR! stack     at Socket.emit (events.js:182:13)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:596:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/.atom/packages/Hydrogen/node_modules/zeromq
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@wadethestealth
Copy link
Member

wadethestealth commented Aug 16, 2019

As stated above you must point your python path to python 2.5-2.7. Please reread this thread and look at the links posted. Most contain a solution or a installation section. @mcguffie

@mcguffie
Copy link

@wadethestealth Setting my npm python path to my Python 2.7 installation did not work. @fohria 's solution worked. Thanks!

@aviatesk
Copy link
Member

UPDATE:

This issue will be hopefully fixed in the next Atom’s patch release (v1.40.1). It’s still not shipped yet though.

Refs:

@jpivarski
Copy link

I'll watch this thread. For what it's worth, I had the same trouble trying to install Hydrogen on Atom 1.40.0 on Linux. Two build logs are attached; one installation attempt inside Atom and another with the command-line apm.

Most libraries on this system are installed with conda, but Atom is installed with the DEB package (on Debian GNU/Linux 9 Stretch). apm was run in the conda environment; it should see conda packages as dependencies (if relevant).

2019-08-17T15_41_01_452Z-debug.log
2019-08-17T15_37_40_163Z-debug.log

@aviatesk
Copy link
Member

Okay, now this issue should be fixed with the release of Atom v1.40.1: https://atom.io

@DataDavD
Copy link

wish this wasn't closed... I still had this issue and wasn't resolved with release of Atom v1.40.1. I actually had to comment out the same line in my apm as line 53 here in this issue tracker to resolve this on my work and personal computers.

@wadethestealth
Copy link
Member

@DataDavD I am sorry to hear that v1.40.1 did not fix this issue for you. This issue was closed because it was merely a tracker of our hunt down for the issue as well as a notice until it was fixed by Atom/Apm. If you are still having issues though I would recommend you open an issue over there instead, since there is nothing we can do about this type of issue.

@DataDavD
Copy link

no worries. still getting a hang of the open-source resolution workflow on GitHub. Should I open another issue if I still had the issue but that my resolution fixed it? Is that something I should have been doing to resolve the issue? I had found it in here

@jpivarski
Copy link

Atom 1.40.1 fixed it for me, so there's likely two bugs, one of which doesn't affect my setup. Since there's a second bug, I'd think it should be a second GitHub issue.

@wadethestealth
Copy link
Member

@DataDavD If you believe that you have a different issue than the one previously posted or it is closed without a working solution for you, You should open a new issue and mention the solutions you tried but failed. Always try to open an issue on the repo that holds the code that is failing, but if you are unsure open an issue anyways and people will redirect you however this may not always be a fast process. In my opinion opening an issue posting a solution and closing is fine, however it is unlikely to get labeled which can make it semi difficult to find if they don't search your exact wording. In general people will be nice if you act nicely, so if you need help speak up, but I have had plenty of times where I was ignored or the maintainers are no longer active, so occasionally you just have to solve things alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants