3
votes

i have conda installation with python 2.7.10 in windows 8, with installed ipython notebook and jupyter. when i try to run ipython notebook from console? it runs just ok. but from intellij idea i receive an error, like it doesn't see notebook installments:

path\to\python\Miniconda3\envs\py27\python.exe path\to.IntelliJIdea14\config\plugins\python\helpers\pycharm\pycharm_load_entry_point.py notebook --no-browser --ip 127.0.0.1 --port 8888

Traceback (most recent call last): File "path\to.IntelliJIdea14\config\plugins\python\helpers\pycharm\pycharm_load_entry_point.py", line 8, in load_entry_point(dist, "console_scripts", name)()

File "path\topython\Miniconda3\envs\py27\lib\site-packages\setuptools-18.3.2-py2.7.egg\pkg_resources__init__.py", line 558, in load_entry_point
File "path\topython\Miniconda3\envs\py27\lib\site-packages\setuptools-18.3.2-py2.7.egg\pkg_resources__init__.py", line 2681, in load_entry_point ImportError: Entry point ('console_scripts', 'ipython') not found

i've tried to make it work several times, console and ide concurrently, and once in a time it did run in ide too, but after succesful shutdown it doesn't run again. What could be a problem?

# packages in environment at path\to\python\Miniconda3\envs\py27:

#

jupyter-client 4.0.0

jupyter-core 4.0.6

jupyter_client 4.0.0 py27_0

jupyter_core 4.0.6 py27_0

[py27] conda list ipython

# packages in environment at path\to\python\Miniconda3\envs\py27: #

ipython 4.0.0 py27_0

ipython-genutils 0.1.0

ipython-notebook 4.0.4 py27_0

ipython-qtconsole 4.0.1 py27_0

ipython_genutils 0.1.0 py27_0

could jupyter install be a problem?

1

1 Answers

1
votes

As far as I can tell this is a problem with Intellij IDEA and not with Jupyter.

I'm having the exact same problem with Intellij IDEA 14.1.5 using Anaconda with Jupyter Notebook installed. However when I attempt to start Ipython Notebook in pyCharm it works fine (Though I had to downgrade to Ipython 3.2.1, but that is an entirely unrelated issue, just mentioning it in case it happens to you).

As for a solution:

Just replace the content of {config_dir}.IntelliJIdea14\config\plugins\python\helpers\pycharm\pycharm_load_entry_point.py with the following code:

import os, sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
  dist = os.environ.get("PYCHARM_EP_DIST")
  name = os.environ.get("PYCHARM_EP_NAME")
  if dist == "ipython" and name == "ipython":
    from IPython import start_ipython
    f = start_ipython
  else:
    f = load_entry_point(dist, "console_scripts", name)
  sys.exit(f())

I found this hack by chance on github. Not sure if you can rely on it though, it may be overwritten by future updates.