mmatera / iwolfram

A jupyter kernel for Wolfram Mathematica

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manipulate[] error in Jupyter Notebook

julien-blanchon opened this issue · comments

Hi, I have install a fresh Jupyter (4.1) with fresh iPython and Wolfram kernel on macOS (without docker).

In[0]:
    $Version

Out[0]:
    Mathics 1.1.dev0 on CPython 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:52:12)  using SymPy 1.0, mpmath 0.19

I launch Jupyter with jupyter notebook --kernel=wolfram_kernel.
But wolfram_kernel was not found:
[W 16:27:13.394 NotebookApp] Unrecognized alias: '--kernel=wolfram_kernel', it will probably have no effect.

And wolfram language work:

In[1]: Table[Fibonacci[x],{x,1,10}]
Out[1]: {1, 1, 2, 3, 5, 8, 13, 21, 34, 55}

But for Manipulate[] I get:

In[2]: Manipulate[Plot[Sin[a x + b], {x, 0, 6}], {a, 1, 4}, {b, 0, 10}]
Out[2]: Manipulate::jupyter: Manipulate[] only works inside a Jupyter notebook.

And for Plot[] I get:

In[3]: Plot[Sin[x],{x,0,10}]
Out[3]: Export::noelem: {svg} is not a valid set of export elements for the SVG format./tmp/mdspo9qjj/session-figure5.svg

So when I launch with: jupyter qtconsole --kernel=wolfram_kernel I get same.

Hi julien,

the current version does not have support for dynamical objects like Manipulate or dynamics 3D graphics. Moreover, 2d and 3d graphics work properly when the kernel uses the wolfram mathematica kernel, but not the mathics one, which is work in progress.

Ok, And for Plot[], I use the mathematica kernel (and not mathics, but the $Version say mathics) and that don't work. Perhaps jupyter doesn't find mathematica kernel and use mathics. But its strange.

According to the output you reported for $Version, it seems you are using the mathics kernel. Please check the path the file config.py in the installed wolfrak_kernel folder.

Sure but I did that python /Users/blanchonjulien/GitHub/iwolfram/setup.py build --mma-exec "/Applications/Mathematica\ 2.app/Contents/MacOS/WolframKernel". Mathematica was detect

Using Wolfram Mathematica

But the setup script just make a local folder with iwolfram kernel and don't inject him in jupyter (And i don't have any config.py). And in /Users/blanchonjulien/anaconda/lib/python3.5/site-packages/wolfram_kernel/ I have my old kernel (but mathics) with config.py (but mathics).

I didn't check it out on a MacOS, but the mechanism seems to work in at least, debian (and ubuntu). What about if you erase by hand the folder
/Users/blanchonjulien/anaconda/lib/python3.5/site-packages/wolfram_kernel/
and you try to reinstall it again?

Sorry for the time. Yes It work just a stupid forgetting.