rizinorg / cutter-jupyter

Jupyter Plugin for Cutter
GNU General Public License v3.0
24 stars 5 forks source link

Cutter's Python interpreter does not find Jupyter #7

Closed d-Zim closed 4 years ago

d-Zim commented 5 years ago

I am using macOS 10.12.6 and Cutter Version 1.8.2. The Python versions 2.7 and 3.7 have been installed via Homebrew on my machine. Import of Jupyter modules works on both versions.

The Cutter's app bundle embedded Python interpreter fails to import those modules. Thus the cutter-jupyter plugin will not be recognized/loaded:

dzim@yankee ~ $ /Applications/Cutter.app/Contents/MacOS/Cutter
Cutter Launch Script for macOS 🥞
Setting PYTHONHOME = "/Applications/Cutter.app/Contents/Frameworks/Python.framework/Versions/Current"  for macOS Application Bundle.
PYTHONHOME = "/Applications/Cutter.app/Contents/Frameworks/Python.framework/Versions/Current"
Setting r2 prefix = "/Applications/Cutter.app/Contents/Resources/r2"  for macOS Application Bundle.
Plugins are loaded from "/Users/dzim/Library/Application Support/RadareOrg/Cutter/plugins"
Couldn't load module for plugin: "cutter_jupyter"
Traceback (most recent call last):
  File "/Users/dzim/Library/Application Support/RadareOrg/Cutter/plugins/python/cutter_jupyter/__init__.py", line 2, in <module>
    from . import plugin
  File "/Users/dzim/Library/Application Support/RadareOrg/Cutter/plugins/python/cutter_jupyter/plugin.py", line 5, in <module>
    from .manager import JupyterManager
  File "/Users/dzim/Library/Application Support/RadareOrg/Cutter/plugins/python/cutter_jupyter/manager.py", line 6, in <module>
    from notebook.notebookapp import *
ModuleNotFoundError: No module named 'notebook'
Loaded 0 plugin(s).
duzvik commented 4 years ago

@d-Zim Check this pull request: https://github.com/radareorg/cutter-jupyter/pull/10

ITAYC0HEN commented 4 years ago

Fixed with instructions in #10 :)

0x715C commented 4 years ago

Ubuntu 19.10, Cutter 1.10.1. same problem


PYTHONHOME = "/tmp/.mount_CuttermbRQzP/usr"
Setting r2 prefix = "/tmp/.mount_CuttermbRQzP/usr"  for AppImage.
Setting r2 plugins dir = "/tmp/.mount_CuttermbRQzP/usr/share/radare2/plugins"
Plugins are loaded from "/home/0x715c/.local/share/RadareOrg/Cutter/plugins"
Couldn't load module for plugin: "cutter_jupyter"
Traceback (most recent call last):
  File "/home/0x715c/.local/share/RadareOrg/Cutter/plugins/python/cutter_jupyter/__init__.py", line 2, in <module>
    from . import plugin
  File "/home/0x715c/.local/share/RadareOrg/Cutter/plugins/python/cutter_jupyter/plugin.py", line 5, in <module>
    from .manager import JupyterManager
  File "/home/0x715c/.local/share/RadareOrg/Cutter/plugins/python/cutter_jupyter/manager.py", line 6, in <module>
    from notebook.notebookapp import *
ModuleNotFoundError: No module named 'notebook'
Loaded 0 plugin(s).
Plugins are loaded from "/usr/share/ubuntu/RadareOrg/Cutter/plugins"
Plugins are loaded from "/usr/local/share/RadareOrg/Cutter/plugins"
Plugins are loaded from "/usr/share/RadareOrg/Cutter/plugins"
Plugins are loaded from "/var/lib/snapd/desktop/RadareOrg/Cutter/plugins"
Plugins are loaded from "/tmp/.mount_CuttermbRQzP/usr/share/RadareOrg/Cutter/plugins"
Loaded 1 plugin(s).```