kiyoon / jupynium.nvim

Selenium-automated Jupyter Notebook that is synchronised with NeoVim in real-time.
MIT License
520 stars 15 forks source link

no module named jupynium #110

Closed ducks4rule closed 7 months ago

ducks4rule commented 7 months ago

Describe the bug after installation with packer, when I run 'JupyniumStartAndAttachToServer', nothing happens.

To Reproduce Steps to reproduce the behavior:

Expected behavior Attaching to server

Logs in /tmp/jupynium/logs/ The tmp directory path can be different in a different OS.
Alternatively, run :JupyniumStartAndAttachToServerInTerminal to see the output directly in neovim.

Paste the output here

/usr/bin/python3: No module named jupynium

Output of jupynium --version

Jupynium v0.2.2

Output of nvim --version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Additional context I am running arch, so I had to change the comand in packer from run="pip3 install --user jupyium" to run=pipx install jupynium I updated the $PATH variable, so I'm not sure, why it doesn't find it. Where would I change the search path for jupyium?

kiyoon commented 7 months ago

Hi, check if the build has failed because I think the command has a typo. run="pip3 install --user jupyium" should be "jupynium" not "jupyium".

j-milkovits commented 6 months ago

Hey @ducks4rule, did you get it up & running on Arch Linux? notebook (<=7.0) & jupynium are installed with pipx. I am installing it the following way using lazy.nvim.

  {
    "kiyoon/jupynium.nvim",
    build = "pipx install .",
  },

My current issues are probably due to the inability to install system-wide packages with pip and having to use pipx. My two major issues are:

If you have any guidance on how you got it running on Arch, I'd be really glad! The plugin looks great, but even after looking through all the issues, I don't really know what to do anymore.

kiyoon commented 6 months ago

JupyniumStartSync simply doesn't exist as a command (even right after installing & with filename 'test.ju.py')

You need to first start the server with :JupyniumStartAndAttachToServer which will open Firefox, and then the sync command will appear.

I believe installing with pipx wouldn't be a problem. Make sure the command jupynium is available from the environment you're running neovim. If you don't see any commands like the start and attach command above, it's probably because of the lazy loading not because of the python package. Turn off lazy loading for this plugin first until you see how it works.

ducks4rule commented 6 months ago

I don't know why, but when I installed it over pipx nvim couldn't start the server via jupynium although it was available as a command in the shell. I did not lazy load the package, so at least for me this was not the issue.

The way I got it working in the end was installing it system wide with pip: $ pip install --break-system-packages jupynium This has the disadvantage that you need to reinstall it every time you update your system, but so far that has been ok.

j-milkovits commented 6 months ago

I can't thank you both enough for responding that quickly! Got it to work finally, thanks! Seemed to mostly be an issue of lazy loading and the global installation of python packages on Arch. Got it to work by installing it in a venv and only loading the package manually if I really need it.

Great plugin @kiyoon, thanks a lot for your work!