I have a really basic question, but the more I read, the more confused I get: How do I install pip so I can install kernels?

This question came about when I tried to install the Hydrogen package to use in Atom, the text editor (to help me learn Python). I finally succeeded in installing Hydrogen, but got stumped by the missing kernels (not sure which ones I need, so I am willing to install them all). But I can't seem to install the kernels without pip.

I have a vague understanding of the implications of global vs local installations--I get that certain Python installations aren't compatible with local or global kernel installations (I hope I have the terminology right.) But I saw several warnings about installing pip for "a homebrew based python installation", but I am not sure whether Python on my laptop is installed via homebrew (nor how to find out).

So if Python(2.7) came pre-installed on my MacBook Pro (High Sierra), can I just do sudo easy_install pip (as suggested) from the command line--withOUT causing issues?

I first posted this question in StackExchange and was advised to seek help here. Frankly I wasn't sure whether this was a Mac question or a Atom question.

Thanks in advance!

  • Macs come with Python installed but most people use a different distribution. Either Anaconda or Homebrew seems to be the most popular.
    – Natsfan
    Dec 31, 2017 at 18:40
  • Have you tried using pip. it should already be installed on your mac.
    – Natsfan
    Dec 31, 2017 at 18:45
  • Apparently pip is not installed. I followed the instructions to query whether pip had been installed and got "-bash: pip: command not found". So I was totally stumped.
    – YCode
    Dec 31, 2017 at 18:49
  • 2
    command not found could be a path problem. Have you tried typing 'which pip' and 'locate pip'?
    – Natsfan
    Dec 31, 2017 at 19:07
  • 1
    Can you please post the solution as an answer below (and accept it) instead of adding it to the question?
    – nohillside
    Jan 1, 2018 at 8:56

2 Answers 2


I had the same problem. I solved it by making the first line of my script:


I type which python and use the result in first line of script. Now Hydrogen works every time.


I solved the problem of installing pip-but it is NOT a perfect solution because I discovered Hydrogen sometimes kicks in and sometimes not--this relates to my initial concern about global/local installations. But here's how I installed pip; perhaps others can help resolve the rest.

  1. Install Python 3 (from python.org).
  2. Follow instructions to get 'get-pip.py' (https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line). (This was done from the terminal)
  3. In Atom, cmd+shift+p to bring up the packages menu; click on 'Hydrogen Run'. When the errors message pops up,copy the code from the error warnings, go back to the terminal, and install the kernels needed (via the command line).
  4. At this point, Hydrogen is now working.
  5. BUT: in Atom, sometimes Hydrogen works, sometimes it doesn't. So it's not stable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .