Comments (46)
@hugeme
ln -s /usr/local/share/kernels/python2 ~/.ipython/kernels
Try this.
It's a bug fixed here: #144
If hydrogen can't to interpret all folders as kernels it fails and return no kernels at all.
from hydrogen.
@hugeme Generally I don't know how to install kernels properly on MacOS. So you can look here:
But as I remember this should work: sudo python3 -m IPython kernelspec install-self
.
Please copy output of jupyter --paths
for investigation purposes.
You have python kernel in a list because it was shamelessly hardcoded. So hydrogen may not founding it.
To fix #135 you should reinstall hydrogen as a regular user and then apm rebuild
from hydrogen.
This may be related to other path and kernel search issues, which might be addressed in #19. I'm assuming arch uses the XDG directories and env variables?
from hydrogen.
This is a fine place to ask!
Hydrogen doesn't start a kernel until you run something, so if you haven't done a "Hydrogen:run" command yet, the kernel won't show up.
Otherwise, did you start Atom from the command line? If not, it can't see your $PATH.
Let me know if neither of those solves it and we'll try to figure out the problem.
from hydrogen.
willwhiteney, yes, I have run it from the command line. When I run hydrogen it shows the following near the line of code, however nothing happens:
rgbkrk, I'll check out that link after I document myself what arch uses.
Do I need to build Jupyter, even though I have installed IPython from the arch package manager? If so, what do I need to build more exactly?
from hydrogen.
Jupyter is just the next release. Which version of IPython are you on?
from hydrogen.
Python 3.4.3 and IPython 3.1.0. Although I also have Python 2.7.9 and its respective IPython (3.1.0) installed.
from hydrogen.
Can you run
from IPython.utils.path import get_ipython_dir; get_ipython_dir()
in a python or IPython terminal?
from hydrogen.
Sure, sorry for the delay:
Out[1]: '/home/calin/.ipython'
That's what I get.
from hydrogen.
@acpcalin I log a bunch of stuff out to the console to help debug this sort of thing — mind updating to the latest version, then opening the dev console (View -> Developer -> Toggle Developer Tools) and trying to run something? It should spit out launching kernel:
followed by the command and arguments it's using to try to start the kernel, along with any errors.
from hydrogen.
launching kernel: ipython ["kernel", "--no-secure", "--hb=47608", "--control=50748", "--shell=35255", "--stdin=41349", "--iopub=46541", "--colors=NoColor"]
from hydrogen.
If you leave it waiting for a response, then run that command in your terminal (ipython kernel --no-secure --hb=47608 --control=50748 --shell=35255 --stdin=41349 --iopub=46541 --colors=NoColor
) then it should resolve the result, yes?
Does process.env.PATH
looks right in the Atom console? It could be that Atom is somehow failing to get the PATH properly.
from hydrogen.
Where do I find this entry in the Atom console?
EDIT: nevermind, found it, I needed to execute that command. It says "undefined".
And no, running that command doesn't do it unfortunately.
Maybe it's because I manually built Atom? Maybe I should have installed it from the Arch User Repository with root privileges?
from hydrogen.
Ooh, that's probably the culprit. Investigating...
from hydrogen.
No, sorry. Actually the output is
"/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/.atom"
I didn't know that command was case-sensitive, I am sorry.
from hydrogen.
OK, cool. Now try running cp.spawnSync('ipython', ['--version']).stdout.toString()
in the Atom console.
from hydrogen.
from hydrogen.
Whoops. Run cp = require('child_process')
first, sorry about that.
from hydrogen.
from hydrogen.
OK, so it's definitely able to find your ipython install.
Try running something with Hydrogen, then while it's failing to give you a result, flip over to the terminal and running ipython kernel --no-secure --hb=47608 --control=50748 --shell=35255 --stdin=41349 --iopub=46541 --colors=NoColor
(and substitute for the ports that Hydrogen has printed in the "launching kernel" message if they're different).
from hydrogen.
Ok, this is weird. I didn't run that command yet, because the problem seems to be fixed now. I don't know why or how, however. I'll tell you step by step what I have done: First I tried to run Atom as root (sudo atom
) and noticed that the root profile didn't have Hydrogen installed, even though I installed it in Atom on my normal, non-root, account. Then I tried installing Hydrogen as root (sudo PYTHON=python2 apm install hydrogen
). This way it tried to install somewhere in the .root folder so that it would show up when I ran Atom with sudo. It failed with an error code(I closed the window, unfortunately).
Now, however, Hydrogen works on my normal profile. After I select Hydrogen:Run, it takes 1 second until it detects the IPython kernel and then it works just as expected.
from hydrogen.
Yup, that's bizarre. I'm glad it's working for you now!
Is it possible that this was just a side effect of restarting Atom?
from hydrogen.
I don't really know, maybe. Thanks for the help!
from hydrogen.
I just realized, sometimes Hydrogen finds the kernel, sometimes it doesn't. Closing and opening Atom several times and trying to run Hydrogen after each time is the solution. I don't know why, but I'm glad it works now.
from hydrogen.
That's very weird. I wouldn't be surprised if it's an issue of the kernel
failing to get started rather than it not being found.
I just published a version with a little more logging of what the kernel
process is doing, so if it keeps being unreliable, you can check out the
new logs and maybe see what's happening.
On Sun, May 24, 2015 at 3:51 PM acpcalin [email protected] wrote:
I just realized, sometimes Hydrogen finds the kernel, sometimes it
doesn't. Closing and opening Atom several times and trying to run Hydrogen
after each time is the solution. I don't know why, but I'm glad it works
now.—
Reply to this email directly or view it on GitHub
#21 (comment)
.
from hydrogen.
May I jump in? Having the same issue, that the kernel is not displayed in the bottom left. And I'm not able to find anything related to that topic but that entry here.
from hydrogen.
@terraqout Thank you for that suggestion. However, I dont have that path /usr/local/share/kernels/python2
.(and after trying that the issue remains)
sudo find / -type d -name 'kernels'
gives back:
Users/me/Library/Jupyter/kernels
/usr/local/lib/python2.7/site-packages/notebook/services/kernels
/usr/local/lib/python2.7/site-packages/notebook/static/services/kernels
/Users/me/Library/Jupyter/kernels
/usr/local/lib/python2.7/site-packages/notebook/services/kernels
/usr/local/lib/python2.7/site-packages/notebook/static/services/kernels
and none of them contains python2.
Additionally, I used brew
/usr/local/Cellar/python/2.7.11/share/python
Not sure whether that matters but hydrogen
is not listed in installed packages within atom
. But I can still Hydrogen:run
. Additionally sudo atom
and Hydrogen:run
results #135. atom
in command line results in #135 as well now.
from hydrogen.
@hugeme And besides, I would appreciate if you experiment with #144 on the same setup before any "fixing".
cd to/your/.atom/packages
rm Hydrogen -rf
git clone [email protected]:willwhitney/hydrogen.git
cd hydrogen
git checkout kernelManagerImpove
apm rebuild
If it would fix your issue, I'll merge it in master.
from hydrogen.
@terraqout #135 seems to be fixed, I'll get again In the right upper corner a blue box with "Scopes at Cursor"
Next:
The jupyter --paths
are:
config:
`/Users/me/.jupyter
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter`
data:
/Users/me/Library/Jupyter /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/share/jupyter /usr/local/share/jupyter /usr/share/jupyter
runtime:
/Users/me/Library/Jupyter/runtime
Next:
I run what you have suggested which ends with apm rebuild
without any errors. Restarting atom
from command line and Hydrogen:run
results in a new error. Red box similar to the At Could not find module root given file: "undefined". Do you have a package.jsonfile?
I'll get cannot find module zmq
and referring to #135 again
from hydrogen.
That's ok — Red box is kernel error, so install zmq as described here: https://github.com/willwhitney/hydrogen#os-x and retry.
thanks for jupyter --paths
from hydrogen.
Do you mean that part?:
brew install pkg-config
brew install zeromq
Both are already brewed/installed. Just reinstalled with same error refering to zmq
. Just a side note. Ipython is running via Jupiter without any problems using python2
from hydrogen.
Jupyter needs zmq for python2, you may have zmq for third.
Try pip2 install zmq
or if your python defaults to second version just pip install zmq
.
from hydrogen.
reinstall zmq
via pip
but with the same error in atom.
Not sure whether its related, but in the upper comment a question is about the output of:
from IPython.utils.path import get_ipython_dir; get_ipython_dir()
when running that via Jupiter I'll get:
/usr/local/lib/python2.7/site-packages/IPython/utils/path.py:258: UserWarning: get_ipython_dir has moved to the IPython.paths module warn("get_ipython_dir has moved to the IPython.paths module")
from hydrogen.
So your kernel isn't in default folder
what is placed here: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/etc/jupyter
?
from hydrogen.
That ends here:
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7
Headers Resources include
Python bin lib
from hydrogen.
Looks like you have the same issue #142
from hydrogen.
Drop your zeromq and try to install other way. It should help :)
from hydrogen.
Thank you! Thats it! "other way around" solved it!
from hydrogen.
@hugeme Can you explain your experience. So we can add this to readme.md?
from hydrogen.
Solution
Just make sure, Python is installed for all users and it is added to the environment variables.
I was also facing the same problem, after adding it to the environment all my problems were solved.
from hydrogen.
@ssahaxd are you interested in making a contribution about this to our docs installation page? The environment variables issue comes up frequently from windows users.
Edit: or the Troubleshooting page
from hydrogen.
@BenRussert of course, I would like to contribute.
where the detailed article I should post?
Troubleshooting page looks a great spot.
from hydrogen.
That's great!
Troubleshooting page looks a great spot.
I agree, especially if you want to go into detail.
from hydrogen.
@BenRussert
added and created a pull request.
from hydrogen.
@ssahaxd thanks again!
from hydrogen.
That is so crazy that the Windows installer doesn't include Python on the path by default. O___O
from hydrogen.
Related Issues (20)
- hydrogen fails to install on Atom HOT 2
- fialedto activate
- npm WARN deprecated [email protected] HOT 2
- Failed to activate the Hydrogen package HOT 18
- [email protected] failed
- Interactive input in output area
- VSCode: port or alternative HOT 12
- Uncaught Error: Cannot find module 'lodash/debounce'Require stack:- $ATOM_HOME/packages\Hydroge... HOT 3
- Uncaught error: no native build was found for platforms HOT 4
- Please port to Vs Code or any other IDE HOT 1
- Uncaught Error: No native build was found for platform=darwin arch=x64 runtime=electron abi=85 uv... HOT 2
- TypeError when using hydrogen with pulsar HOT 4
- Hi, If the notebook in "not trusted" mode. Just click on it and make it trusted then save the file. It will work fine.
- SCRIPT WONT EXECUTE. HOT 1
- can't rebuild zeromq for pulsar
- Newly installed python modules cannot be found by hydrogen in pulsar
- [18:30] r p npm WARN deprecated [email protected]: this library is no longer supported [18:31] r p npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic [18:31] r p npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic
- deleted
- Is this going to be maintained? HOT 5
- Publish Hydrogen to Pulsar Package Repository HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydrogen.