cutter-jupyter icon indicating copy to clipboard operation
cutter-jupyter copied to clipboard

jupyter not in plugins

Open JPBROHM opened this issue 4 years ago • 16 comments

Environment information

  • Operating System: windows 10
  • Cutter version: 1.10.1
  • File format: elf
  • Arch: x86
  • Type: EXEC (Executable file)

Describe the bug jupyter had been installed and is in the plugins folder, yet will not show up in cutter under the listed plugins

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

JPBROHM avatar Mar 08 '20 23:03 JPBROHM

Just a guess: jupyter module wasn't installed.

pelijah avatar Mar 10 '20 20:03 pelijah

When i made the post I had no idea what was going on but I have since looked more into it and found the issue.

The jupyter module was installed but after starting cutter through anaconda instead of just the application it wasn't able to load the plugin and the error message displayed was that it was unable to import the module 'notebook'

This was the same issue that other people had and there was a fix that was implemented into the README file, but the fix was only for MacOSX and im running windows, so I don't know how to get the jupyter module into the correct place so cutter can see all the directories and import all the modules in order for cutter to be able to properly load the plugin

JPBROHM avatar Mar 11 '20 06:03 JPBROHM

@JPBROHM can you please edit your initial issue with all the steps you took and all the relevant information? MEantime, I'll move this issue to cutter-jupyter repository

ITAYC0HEN avatar Mar 11 '20 09:03 ITAYC0HEN

Does it matter what steps he did if we have no instructions for what steps should be done?

  • Linux using system Python - should work the regular way
  • Linux using Appimage - no instructions
  • Windows - no instructions
  • macOS - complicated but at least some kind of instructions

karliss avatar Mar 11 '20 09:03 karliss

Prebuilt version of Cutter for Windows is shipped with bundled Python 3. Possible solutions: a) Install jupyter module to its subdir: python - m pip install -I -t %CUTTER_DIR%\python36\site-packages jupyter (yep you need to install python3 first) b) Also you can try to use yours systemwide Python: just remove files python3.dll, python36.dll, python36._pth.

pelijah avatar Mar 11 '20 11:03 pelijah

I tried installing jupyter module to site-packages in python 36 and get this error after trying to start cutter Cutter_Problems

Towards the bottom it says that it cannot import the name constants, but i checked and the file constants is in the cython folder

after looking at the init file it looks like everything it is trying to import is from the cffi folder inside of backend, but is only going back to the cython folder instead of back into the backend folder and then into cffi to import everything?

JPBROHM avatar Mar 11 '20 17:03 JPBROHM

Broken dependencies. IIRC it is not related to Cutter.

pelijah avatar Mar 11 '20 20:03 pelijah

Maybe system pip corrupts some modules. Bundled Python should have own pip.

pelijah avatar Mar 11 '20 20:03 pelijah

should i use the bundled python to install the jupyter module then? if so how do I go about doing that?

JPBROHM avatar Mar 12 '20 01:03 JPBROHM

There is no such feature yet...

pelijah avatar Mar 12 '20 20:03 pelijah

How do I fix the broken dependencies? Is there any way to do that or should am I on my own?

JPBROHM avatar Mar 16 '20 19:03 JPBROHM

Solution in windows:

1)Download and extract Cutter v1.8 2)Copy all files within %CUTTER_DIR%\python36\site-packeges (except PySide2, shiboken2 and Shiboken_generator) in the current Cutter v1.10.2 directory %CUTTER_DIR%\python36\site-packeges

Note: QtWebEngine is not available in the Cutter version 1.10.2

ZorD1 avatar Mar 23 '20 19:03 ZorD1

This doesn't seem a cutter_jupyter bug to me. I'm using Linux Debian (stable) and I loaded a sample plugin which prints all the sys.path:

Path: /tmp/.mount_CutterfbfuC8/usr/lib/python36.zip
Path: /tmp/.mount_CutterfbfuC8/usr/lib/python3.6
Path: /tmp/.mount_CutterfbfuC8/usr/lib/python3.6/lib-dynload
Path: /tmp/.mount_CutterfbfuC8/usr/lib/python3.6/site-packages
Path: /home/cube/.local/share/RadareOrg/Cutter/plugins/python

So my system dist-package directory (the one under /usr) is not in sys.path.

I try to take a look for a possible fix/ a reliable workaround.

cube0x8 avatar May 15 '20 19:05 cube0x8

@cube0x8 If you want a version that uses your system libraries, compile Cutter against your system libraries. The whole point of portable Appimage binary is that it doesn't use system libraries.

karliss avatar May 15 '20 20:05 karliss

That makes sense.

But cutter should provide a way to import plugins also using the AppImage?

cube0x8 avatar May 15 '20 20:05 cube0x8

the process of using plugins inside cutter should be trivial when you mostly use the appimage if we should compile and manually set things up when we want to try out some plugins then the purpose of an appimage is gone

we need a plugin manager to manage dependencies and default settings for plugins

ps: i should've commented this in cutter repo

guivc avatar May 17 '20 18:05 guivc