Comments (18)
I think it does have something to do with pyenv. I was using pyenv for the different versions of python. I just uninstalled it and used a homebrew install of python3.10 and set up the environment like in your docs. Now everything works. Thanks!
from molten-nvim.
I'm on a train currently, so no Internet and answering from my phone, but I have a few ideas:
You probably need to update to the master branch of image.nvim and I probably need to update my docs. If that doesn't fix it could you try these things:
-
Can you try putting a line below the last one that you send to molten? I don't think that would be an issue but it could be.
-
Can you see the output if you enter the floating window? You can open that with
:noautocmd MoltenEnterOutput
-
what happens if you scroll the window (with
<c-e>
/<c-y>
) both from in the float and from outside the float.
from molten-nvim.
Updated on master branch, and no luck :
- extra lines on the bottom don't help
- If I enter the floating window I still can not see the image
- When inside the floating window, I can scroll
<C-e>
until it looks like this
basically I can only scroll one line to where Out[1]: Done is no longer visible.
When outside the floating window, the floating window will move up the screen like it is pinned to the spot just underneath
the code. Until I scroll too far, the cursor is pushed down, and it disappears. Nothing crazy, all seems normal.
from molten-nvim.
Yup all that behavior seems normal. I've got time to dig into this. Thank you for providing a minimal config, i'll take a look.
from molten-nvim.
@bpnordin I can see the image when the output opens the first time, but then if I close the window, the image doesn't show up again. This seems to be related to #84. I'll fix that or revert it if it's too complex (that change didn't make much of a perf impact iirc).
from molten-nvim.
I think I did find the one difference between that image.nvim test and when I try to use molten. It is which python
is running. When I just use the system python(nothing installed), I can render. When I can't render, I am using a virtual python envirnment, but everything is installed. I will play around with it some more.
Using this to test rendering:
:lua require("image").from_file("image.png"):render()
from molten-nvim.
I am now getting a different output when just using the system python. I also have another picture rendered to show that image.nvim is working
Am I just running the wrong code?
from molten-nvim.
I am now getting a different output when just using the system python
Interesting. I wonder if there is a larger issue here then. Do you normally have python3_host_prog
set? I didn't see it in the minimal config and I had to add it to mine as I have all my molten dependencies installed in a virtual environment.
Also I just merged the revert, if you could try using the main branch of molten now that will definitely fix a problem. But perhaps not the exact problem that you're having.
from molten-nvim.
I normally start NeoVim with a virtualenv active and then I have all of the dependencies for molten installed in that virtualenv, if I am going to use it.
I set the python3_host_prog
to the virtualenv instead of activating it
It seems that if I have a virtual environment activated, then rendering in general doesn't work. If I set the host-prog, then it does work. Hmmm
However, even after I updated molten, it still doesn't render the plot.
This is the same behavior if I just use the system python (non-virtualized)
from molten-nvim.
It seems that if I have a virtual environment activated, then rendering in general doesn't work. If I set the host-prog, then it does work. Hmmm
that's odd. I will say that you should be using host-program and a corresponding neovim virtual environment. They way neovim will always launch with the necessary decencies, and you don't have to install all the modules molten needs in every venv you create.
from molten-nvim.
Exactly the same issue here. Also on mac m1. But i dont run a special venv.
from molten-nvim.
Unfortunately I can't help much without a reproduction, I'm not seeing the issue with the current repro.
I do wonder if pyenv
has anything to do with it b/c I personally don't use it.
@sphyrnidae8 are you using pyenv as well?
from molten-nvim.
Both of you should 100% set vim.g.python3_host_prog
so you know for sure what environment neovim is working with. Otherwise it seems to choose venv or system, and it's not exactly the most reproducible thing.
I recommend setting up a neovim
venv the way the docs suggest. This way you can install the packages for neovim once, in once place, and they're not interfered with by anything else.
from molten-nvim.
Also I just merged the revert, if you could try using the main branch of molten now that will definitely fix a problem. But perhaps not the exact problem that you're having.
and yes updating to master has fixed an issue where it will only display the plot the first time in the output, and not if the output hides and then displays again
from molten-nvim.
Awesome! I'm curious about pyenv, now that I know that it's a problem I can look into it. I'm going to open a separate issue to track that problem. nah I'll just change the name of this issue so there's all this context on it.
Thank you for working with me on this one, environment issues are always tricky.
from molten-nvim.
I probably won't get around to this until after Christmas though
from molten-nvim.
I can't reproduce this issue with pyenv. I've installed it, set it up, activated it, installed pynvim and jupyter_client (and ipykernel), tested it with both an existing kernel and the new default python3 kernel, they both work. Images show in virtual text and in floating windows, and they show in multiple floating windows as well.
I did confirm with :checkhealth
that the expected pyenv version of python was being used. also I used python 3.11
My only guess is that you missed something with your pyenv install that you didn't miss when following the docs.
from molten-nvim.
I can't reproduce this issue with pyenv. I've installed it, set it up, activated it, installed pynvim and jupyter_client (and ipykernel), tested it with both an existing kernel and the new default python3 kernel, they both work. Images show in virtual text and in floating windows, and they show in multiple floating windows as well.
I did confirm with
:checkhealth
that the expected pyenv version of python was being used. also I used python 3.11My only guess is that you missed something with your pyenv install that you didn't miss when following the docs.
I met a similar issue and I am pretty sure this is not caused by pyenv but poetry, which is commonly used together with pyenv. This is a known issue with image.nvim and there is no fix, but the workaround is to source the venv created by poetry directly instead of using the poetry shell
from molten-nvim.
Related Issues (20)
- [Bug] Hydra conflicts with MoltenUpdateInterface running async HOT 3
- [Feature Request] Default kernel launch with python on's PATH? HOT 8
- [Help] Running full blocks HOT 4
- [Help] Treesitter text objects not loading HOT 2
- [Feature Request] connect to a remote jupyter kernel HOT 1
- [Help] What am I doing wrong? HOT 9
- [Help] Molten Not in a Cell / [Quarto It seems that the code runner is not initalized for this buffer HOT 7
- [Help] How to set up Python 3 provider HOT 9
- [Help] Virtual Text offset apply only to output text? HOT 11
- [Help] Same config on Arch Linux not working HOT 15
- [Feature Request] Add Lua Rocks for rocks.nvim HOT 3
- [Bug] MoltenExportOutput "attempt to index local 'opts' (a number value)" HOT 2
- [Bug] Output Window Shown In The Wrong Window HOT 3
- [Bug] Issue regarding the cell execution if we delete the content of the cell at the end of a file
- [Bug] Virtual text wrap for pandas HOT 2
- [Bug] MoltenEnterOutput error pynvim.api.common.NvimError: Invalid key: 'footer' HOT 2
- [Bug] MoltenEvaluateVisual Unable to Find Visual Selection HOT 4
- [Bug] assertion error on :MoltenRestart HOT 9
- [Bug] Recent image.nvim changes throw off image positions by one HOT 1
- [Bug] Nvim stops working after kernel is set ready HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from molten-nvim.