Open 00krishna opened 2 years ago
How are you running codebraid
? Have you tried using a terminal in which the environment is activated?
@gpoore Yep, I ran this in the terminal with the Conda environment activated. And that Anaconda environment also has jupyter
installed, as well as notebook
. I even installed matplotlib
in the base
Conda environment, but that did not work either.
I used the command
codebraid pandoc -f markdown -t markdown --overwrite --standalone -o julia_output_python.md julia-braid-test-python.cbmd
I can see that the error messages refer to a path like: File /media/hayagriva/miniforge3/lib/python3.9/site-packages/matplotlib_inline
. I think that this should probably be more like File /media/hayagriva/miniforge3/envs/<MYENVIRONMENT>/lib/python3.9/site-packages/matplotlib_inline
, though the matplotlib library is in that media/hayagriva/miniforge3/lib/python3.9/site-packages/matplotlib_inline
as well.
So something seems a bit off. I will keep playing with it. But let me know if you think there is anything missing.
Okay, I think I figured it out. It is a little screwy.
So if I write it this way,
```{.python .cb-nb jupyter_kernel=python3 session=random example=true}
then I get the problem.
BUT, if I write it this way, then no problem.
```{.python .cb-nb jupyter_kernel=python3 example=true}
So basically I should not names the session
in the first codeblock where I execute or create the jupyter_kernel
? So it seems to work now, but not sure if this is an intended error.
That is strange. session
should have no effect. However, you also don't really need named sessions unless you are splitting your code into independent pieces that you want to run separately in different kernel instances.
Sure, that makes sense. Would you like me to close the issue or keep it open--in case you want to track this behavior where session
causes the error message. As for me, I should probably be okay. But people who use multiple sessions might run into this error?
Let me know what you prefer.
Let's leave the issue open for a few days in case you run into additional problems with this, and so I can try testing a few things. session
is just a string used for internal bookkeeping and naming things in the cache, so it would be good to determine what's happening here.
This might be related to #57. Changing (or removing the session) causes the cache to not be hit and re-runs the code. If there was an attempt to run codebraid before installing the desired package you would see this behavior. That's how I triggered this anyway.
Hello. I use Anaconda to create virtual python environments. I have
jupyter
notebooks andjupyterlab
installed in my load virtual environment, as well ascodebraid.
But for some reason, I can't seem to generate plots with the jupyter kernel, though everything else for python seems to work. So the key question is, do I need to add some instruction to point to the Anaconda environment?I just ran this codeblock in the attached file, and the error message says that
Matplotlib
is not found.Plots
I know that matplotlib is installed, because I can open and
ipython
terminal session, and thenimport matplotlib.pyplot as plt
and that works. julia_output_python.pdf julia-braid-test-python.mdThe full error message is below.