2

The end goal is to get jupyter notebook working on Mac OSX. Due to some conflicts with mac system python, I went the homebrew route:

brew install python

After homebrew is done installing python (and pip2)

export PATH=/usr/local/bin:/usr/local/sbin:$PATH is added to ~/.zshrc

source ~/.zshrc

Now running pip or pip2 gives the following error:

pip2 install jupyter

Traceback (most recent call last):
  File "/usr/local/bin/pip2", line 11, in <module>
    load_entry_point('pip==9.0.1', 'console_scripts', 'pip2')()
  File "/Users/user1/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 564, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/user1/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 2661, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'pip2') not found
SwimBikeRun
  • 4,192
  • 11
  • 49
  • 85
  • either you haven't properly installed pip or your PATH is not set up correctly. Refer to [Here](https://stackoverflow.com/questions/17271319/how-do-i-install-pip-on-macos-or-os-x) for installing python/pip correctly for OSX – Rifat Bin Reza Aug 03 '17 at 23:18
  • I guess this is the result of a previous attempt at installing Python. Verify first that the first line of `/usr/local/bin/pip2` reads `#!/usr/local/opt/python/bin/python2.7`. Then, move/rename the `/Users/user1/Library/Python/2.7` directory to something like `/Users/user1/Library/Python/2.7-aside`, and try again installing jupyter. –  Aug 03 '17 at 23:24
  • @RifatBinReza pip is installed fine, and PATH is set correctly, since the second line in the traceback indicates it finds the correct pip2. Nowadays, Python (2 and 3) come with pip alongside. Using the suggested link will probably just install pip for the system Python, which should not be done in this case. –  Aug 03 '17 at 23:26
  • oh yeah! :/ anyways, maybe [this](https://stackoverflow.com/a/6803614/6480803) is the solution you are looking for @SwimBikeRun – Rifat Bin Reza Aug 03 '17 at 23:34
  • @RifatBinReza doesn't look likely, since that points to a permissions issue with `/System/...`, while here, the relevant directory is local, owned by the user. The thing is, the relevant directory should be under `/usr/local/`, since Homebrew will have installed everything there. –  Aug 04 '17 at 00:06
  • having the same issue now under Debian 8 – lifeofguenter Sep 16 '17 at 10:32
  • 2
    I posted a Homebrew specific solution which worked for me here: https://stackoverflow.com/a/46922580/26219 – Mark Edington Oct 25 '17 at 01:40

0 Answers0