Hello
On 8/24/18, H. Hirzel <[hidden email]> wrote: > On 8/23/18, Jesús Marí <[hidden email]> wrote: >> I'll take a look to *nteract*, seems that it uses the same protocol to >> communicate with kernels. > > Good, actually my goal is to have a simple installation in a new Linux > installation, > something like > > a) download nteract (https://nteract.io/desktop), a 50MB executable file > b) set up Pharo 6.1 with JupyterTalk > c) whatever else is necessary, hopefully not to much > I have now a working JupyterTalk installation, see the attached screen shot. What needs to be done is to come up with a reviewed, reproducible, easy to use installation process. The steps I used are a) a fresh new Ubuntu 18.04.1 64 bit bionic beaver installation then sudo apt-get update b) python --version Command 'python' not found, but can be installed with: python3 --version Python 3.6.5 b) Instead of anaconda I tried then pip3 approach sudo apt install python3-pip python3 -m pip install jupyter But jupyter notebook did not work. After sudo apt install jupyter-core sudo apt install jupyter-notebook This only downloaded 50MB instead of the 600MB for anaconda The command jupyter-notebook worked. Note the dash, i.e. it is a different command Then sudo apt-get install curl and the Pharo 6.1 64 bit installation curl get.pharo.org/64/61+vm | bash Then the Metacello installation taken from https://github.com/jmari/JupyterTalk. Creation of the kernel.json file as described in https://github.com/jmari/JupyterTalk was not necessary The content of ls /usr/share/jupyter/kernels/ is only python3 Interestingly, no entry for a Pharo kernel. The CLI command jupyter-notebook brings up a working Jupyter dashboard with the Pharo Smalltalk menu entry installed in the 'New' menu. --Hannes On 8/24/18, H. Hirzel <[hidden email]> wrote: > On 8/23/18, Jesús Marí <[hidden email]> wrote: >> I'll take a look to *nteract*, seems that it uses the same protocol to >> communicate with kernels. > > Good, actually my goal is to have a simple installation in a new Linux > installation, > something like > > a) download nteract (https://nteract.io/desktop), a 50MB executable file > b) set up Pharo 6.1 with JupyterTalk > c) whatever else is necessary, hopefully not to much > |
Last update works also on *nteract*
In the other hand, I could not understand how Jupyter knows about Pharo kernel without the configuration file!!! Unbelievable! -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html |
Actually there is a probably a configuration file, but not in the
place where I checked, I assume. I have Ubuntu or Ubuntu based test installations in partitions sda6,7,8,9,10. I can not recall in which partition in actually happened. However I found out about the command [1] jupyter --paths And I did this in some of the different test installations [2] In sda8 I have user8@Latitude2:~$ ls /usr/share/jupyter kernels nbextensions user8@Latitude2:~$ ls /usr/share/jupyter/kernels python3 user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels pharo So the probable explanation is that there was actually a configuration file but not in /usr/local/share/jupyter/kernels/pharo as you indicate in https://github.com/jmari/JupyterTalk/blob/master/README.md but in /usr/share/jupyter/kernels So my guess is that a download *nteract* (https://www.nteract.io/) alone and pharo6.1 with Juyptertalk (thus no python notebook) should work in a new Linux installation if there is a a kernel.json file with Pharo Smalltalk [3] in either /usr/local/share/jupyter/kernels/pharo OR /usr/share/jupyter/kernels/pharo I will test that and report to the list. --Hannes [1] jupyter help ================= user10@Latitude2:~$ jupyter --help usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [subcommand] Jupyter: Interactive Computing positional arguments: subcommand the subcommand to launch optional arguments: -h, --help show this help message and exit --version show the jupyter command's version and exit --config-dir show Jupyter config dir --data-dir show Jupyter data dir --runtime-dir show Jupyter runtime dir --paths show all Jupyter paths. Add --json for machine-readable format. --json output paths as machine-readable json Available subcommands: bundlerextension console kernel kernelspec migrate nbconvert nbextension notebook qtconsole run serverextension troubleshoot trust [2] jupyter paths in different test installations ================================================= sda7 ----- jupyter --paths config: /home/user25/.jupyter /home/user25/anaconda3/etc/jupyter /usr/local/etc/jupyter /etc/jupyter data: /home/user25/.local/share/jupyter /home/user25/anaconda3/share/jupyter /usr/local/share/jupyter /usr/share/jupyter runtime: /run/user/1000/jupyter sda8 ------- jupyter --paths config: /home/user8/.jupyter /usr/etc/jupyter /usr/local/etc/jupyter /etc/jupyter data: /home/user8/.local/share/jupyter /usr/local/share/jupyter /usr/share/jupyter runtime: /run/user/1000/jupyter user8@Latitude2:~$ ls /usr/share/jupyter kernels nbextensions user8@Latitude2:~$ ls /usr/share/jupyter/kernels python3 user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels pharo user8@Latitude2:~$ sda10 ----- user10@Latitude2:~$ jupyter --paths config: /home/user10/.jupyter /usr/etc/jupyter /usr/local/etc/jupyter /etc/jupyter data: /home/user10/.local/share/jupyter /usr/local/share/jupyter /usr/share/jupyter runtime: /run/user/1000/jupyter [3] Example kernel.json file for Pharo ====================================== ls /usr/local/share/jupyter/kernels/pharo kernel.json user8@Latitude2:~$ cat /usr/local/share/jupyter/kernels/pharo/kernel.json { "argv": [ "/home/user8/pharo-vm/bin/pharo", "/home/user8/Pharo.image", "ipharo", "{connection_file}" ], "display_name": "Pharo Smalltalk", "language": "smalltalk" } On 8/24/18, Jesús Marí <[hidden email]> wrote: > Last update works also on *nteract* > > In the other hand, I could not understand how Jupyter knows about Pharo > kernel without the configuration file!!! Unbelievable! > > > > > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > > |
Hello Jesús Marí
The JavaScript kernel has custom output functions [1] such as $$.html(htmlString) $$.svg(svgString) $$.png(base64String) $$.jpeg(base64String) $$.mime(mimeBundle) What is the equivalent for $$.svg(svgString) for example? Regards Hannes [1] http://n-riesco.github.io/ijavascript/doc/custom.ipynb.html On 8/27/18, H. Hirzel <[hidden email]> wrote: > Actually there is a probably a configuration file, but not in the > place where I checked, I assume. > > I have Ubuntu or Ubuntu based test installations in partitions > sda6,7,8,9,10. I can not recall in which partition in actually > happened. > > However I found out about the command [1] > > jupyter --paths > > And I did this in some of the different test installations [2] > > In sda8 I have > > user8@Latitude2:~$ ls /usr/share/jupyter > kernels nbextensions > > user8@Latitude2:~$ ls /usr/share/jupyter/kernels > python3 > > user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels > pharo > > > So the probable explanation is that there was actually a configuration > file but not in > > /usr/local/share/jupyter/kernels/pharo > > as you indicate in > https://github.com/jmari/JupyterTalk/blob/master/README.md > > but in > > /usr/share/jupyter/kernels > > > So my guess is that a download *nteract* (https://www.nteract.io/) > alone and pharo6.1 with Juyptertalk (thus no python notebook) should > work in a new Linux installation if there is a > > a kernel.json file with Pharo Smalltalk [3] > > in either > > /usr/local/share/jupyter/kernels/pharo > OR > /usr/share/jupyter/kernels/pharo > > I will test that and report to the list. > > --Hannes > > > > > [1] jupyter help > ================= > > user10@Latitude2:~$ jupyter --help > usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] > [--paths] [--json] > [subcommand] > > Jupyter: Interactive Computing > > positional arguments: > subcommand the subcommand to launch > > optional arguments: > -h, --help show this help message and exit > --version show the jupyter command's version and exit > --config-dir show Jupyter config dir > --data-dir show Jupyter data dir > --runtime-dir show Jupyter runtime dir > --paths show all Jupyter paths. Add --json for machine-readable > format. > --json output paths as machine-readable json > > Available subcommands: bundlerextension console kernel kernelspec migrate > nbconvert nbextension notebook qtconsole run serverextension troubleshoot > trust > > > > [2] jupyter paths in different test installations > ================================================= > > > sda7 > ----- > jupyter --paths > config: > /home/user25/.jupyter > /home/user25/anaconda3/etc/jupyter > /usr/local/etc/jupyter > /etc/jupyter > data: > /home/user25/.local/share/jupyter > /home/user25/anaconda3/share/jupyter > /usr/local/share/jupyter > /usr/share/jupyter > runtime: > /run/user/1000/jupyter > > > sda8 > ------- > > jupyter --paths > config: > /home/user8/.jupyter > /usr/etc/jupyter > /usr/local/etc/jupyter > /etc/jupyter > data: > /home/user8/.local/share/jupyter > /usr/local/share/jupyter > /usr/share/jupyter > runtime: > /run/user/1000/jupyter > > > > user8@Latitude2:~$ ls /usr/share/jupyter > kernels nbextensions > user8@Latitude2:~$ ls /usr/share/jupyter/kernels > python3 > user8@Latitude2:~$ ls /usr/local/share/jupyter/kernels > pharo > user8@Latitude2:~$ > > > > sda10 > ----- > > > > user10@Latitude2:~$ jupyter --paths > config: > /home/user10/.jupyter > /usr/etc/jupyter > /usr/local/etc/jupyter > /etc/jupyter > data: > /home/user10/.local/share/jupyter > /usr/local/share/jupyter > /usr/share/jupyter > runtime: > /run/user/1000/jupyter > > > > > [3] Example kernel.json file for Pharo > ====================================== > > ls /usr/local/share/jupyter/kernels/pharo > kernel.json > user8@Latitude2:~$ cat /usr/local/share/jupyter/kernels/pharo/kernel.json > { > "argv": [ > "/home/user8/pharo-vm/bin/pharo", > "/home/user8/Pharo.image", > "ipharo", > "{connection_file}" > ], > "display_name": "Pharo Smalltalk", > "language": "smalltalk" > } > > > > > On 8/24/18, Jesús Marí <[hidden email]> wrote: >> Last update works also on *nteract* >> >> In the other hand, I could not understand how Jupyter knows about Pharo >> kernel without the configuration file!!! Unbelievable! >> >> >> >> >> -- >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html >> >> > |
You can display text or html using
self display openInJupyter:'*hello world in bolt*' or anything in a morph (a jpg, png ..a Roassal drawing). self display openInJupyter: aMorph you can expecify the extent self display openInJupyter: aMorph extent: aPoint. if you have installed Roassal group (it's a hack of many Roassal Classes) then you can visualize Interactive Roassal drawings doing: "this will load a modified version of Roassal.js that opens a Roassal view inside <div>" self loadScript: IPRoassal js. self display interactionOn; openInJupyter: aRoassalView. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html |
On 8/29/18, Jesús Marí <[hidden email]> wrote:
> You can display text or html using > self display openInJupyter:'*hello world in bolt*' > > or anything in a morph (a jpg, png ..a Roassal drawing). > self display openInJupyter: aMorph > > you can expecify the extent > self display openInJupyter: aMorph extent: aPoint. Thanks! This is convenient! > if you have installed Roassal group (it's a hack of many Roassal Classes) > then you can visualize Interactive Roassal drawings doing: > > "this will load a modified version of Roassal.js that opens a Roassal view > inside <div>" > self loadScript: IPRoassal js. > > self display > interactionOn; > openInJupyter: aRoassalView. > |
In reply to this post by SergeStinckwich
Hi Mr.Hirzel about opening SVG, files, in fact you can open SVG as a morph using (ASVGMorph fromFile: 'file.svg') but first you need to install XML parser from the catalog. I think there is a missing dependency.
so you can do
self display openInJupyter:(ASVGMorph fromFile: 'file.svg').
About nteract and jupytertalk, I mean you need to install jupyter if you want to use other kernels but node kernel so your plan about installing only nteract+jupyterTalk wonn't be factible.
I already have JupyterTalk working on Pharo 32 bits(windows) but it is harder to install than Linux or Mac because you need to install zeromq 32 bits...it is not so complicated but you need to install an additional dependency.
In a few days it will be available in JupyterTalk repository.
El mié., 29 ago. 2018 a las 19:38, H. Hirzel (<[hidden email]>) escribió: About Windows ... do not worry, time will tell... |
Free forum by Nabble | Edit this page |