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 (<hannes.hirzel@gmail.com>) escribió:
About Windows ... do not worry, time will tell...
At the moment I have it on Linux and that is fine.
I am now more interested in actually USING it.
See my question about giving back SVG graphics results
On 8/29/18, Jesus Mari Aguirre <jmariaguirre@gmail.com> wrote:
I think Windows will not be possible by now, there's not Pharo 64 bits on windows...I don't know what version of zeroMQ uses nteract, I think there is a 32 bits version... I'll do my best but I can not guarantee to have JupyterTalk on Windows.
El mié., 29 ago. 2018 a las 6:30, H. Hirzel (<hannes.hirzel@gmail.com>) escribió:
Thank you for keeping me informed.
I now manage to get Linux installations working, but the process is still not consistent, see the installation log for Ubuntu 18.04 below.
It could be that it is much easier for Windows, at the moment I only have a 32bit Windows installation, so I cannot check.
I'd like to focus now on _using_ the Pharo Smalltalk kernel, see upcoming mail on the list.
--Hannes
========================================
New Ubuntu 18.04 installation
sudo apt-get update
sudo apt install python3-pip
pip3 install jupyter
did not work the first time (network issues?)
pip3 install jupyter
sudo apt install jupyter-core
sudo apt install jupyter-notebook
================================================================================
Installation log
================================================================================
user9@Latitude2:~$
python3 --version Python 3.6.5
sudo apt-get update
sudo apt install python3-pip
user9@Latitude2:~$ sudo apt install python3-pip [sudo] password for user9: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: build-essential dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libexpat1-dev libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev python-pip-whl python3-dev python3-distutils python3-lib2to3 python3-setuptools python3-wheel python3.6-dev Suggested packages: debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib autoconf automake libtool flex bison gcc-doc gcc-7-multilib gcc-7-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc libstdc++-7-doc make-doc python-setuptools-doc The following NEW packages will be installed: build-essential dh-python dpkg-dev fakeroot g++ g++-7 gcc gcc-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libexpat1-dev libfakeroot libgcc-7-dev libitm1 liblsan0 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev python-pip-whl python3-dev python3-distutils python3-lib2to3 python3-pip python3-setuptools python3-wheel python3.6-dev 0 upgraded, 39 newly installed, 0 to remove and 60 not upgraded. Need to get 32.3 MB of archives. After this operation, 141 MB of additional disk space will be used. Do you want to continue? [Y/n] y
pip3 install jupyter
Error
Downloading
https://files.pythonhosted.org/packages/94/dd/fe6c4d683b09eb05342bd2816b7779...
(89kB < https://files.pythonhosted.org/packages/94/dd/fe6c4d683b09eb05342bd2816b7779...
) 22% |ââââââââ | 20kB 24kB/s eta 0:00:03Exception: Traceback (most recent call last): File
"/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py",
line 302, in _error_catcher yield File
"/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/response.py",
line 384, in read
REDO
pip3 install jupyter
But then
jupyter
Command 'jupyter' not found, but can be installed with:
sudo apt install jupyter-core
user9@Latitude2:~$ sudo apt install jupyter-core [sudo] password for user9: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: python3-decorator python3-ipython-genutils python3-jupyter-core python3-traitlets The following NEW packages will be installed: jupyter-core python3-decorator python3-ipython-genutils python3-jupyter-core python3-traitlets 0 upgraded, 5 newly installed, 0 to remove and 60 not upgraded. Need to get 132 kB of archives.
jupyter --version 4.4.0
jupyter notebook Error executing Jupyter command 'notebook': [Errno 2] No such file or directory user9@Latitude2:~$ Error executing Jupyter command 'notebook': [Errno 2] No such file or directory Error: command not found user9@Latitude2:~$
sudo apt install jupyter-notebook Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: fonts-font-awesome fonts-mathjax javascript-common jupyter-nbextension-jupyter-js-widgets libjs-backbone libjs-bootstrap libjs-bootstrap-tour libjs-codemirror libjs-es6-promise libjs-jed libjs-jquery libjs-jquery-typeahead libjs-jquery-ui libjs-marked libjs-mathjax libjs-moment libjs-requirejs libjs-requirejs-text libjs-text-encoding libjs-underscore libjs-xterm liblua5.1-0 libluajit-5.1-2 libluajit-5.1-common pandoc pandoc-data python3-bleach python3-dateutil python3-entrypoints python3-html5lib python3-ipykernel python3-ipython python3-ipywidgets python3-jinja2 python3-jsonschema python3-jupyter-client python3-mistune python3-nbconvert python3-nbformat python3-notebook python3-pandocfilters python3-pickleshare python3-prompt-toolkit python3-pygments python3-simplegeneric python3-terminado python3-testpath python3-tornado python3-wcwidth python3-webencodings python3-zmq Suggested packages: apache2 | lighttpd | httpd python-ipywidgets libjs-jquery-lazyload libjs-json libjs-jquery-ui-docs fonts-mathjax-extras fonts-stix libjs-mathjax-doc texlive-latex-recommended texlive-xetex texlive-luatex pandoc-citeproc texlive-latex-extra context wkhtmltopdf python-bleach-doc python3-genshi python3-lxml python-ipywidgets-doc python-jinja2-doc python-notebook-doc ttf-bitstream-vera python3-pycurl python-tornado-doc python3-twisted The following NEW packages will be installed: fonts-font-awesome fonts-mathjax javascript-common jupyter-nbextension-jupyter-js-widgets jupyter-notebook libjs-backbone libjs-bootstrap libjs-bootstrap-tour libjs-codemirror libjs-es6-promise libjs-jed libjs-jquery libjs-jquery-typeahead libjs-jquery-ui libjs-marked libjs-mathjax libjs-moment libjs-requirejs libjs-requirejs-text libjs-text-encoding libjs-underscore libjs-xterm liblua5.1-0 libluajit-5.1-2 libluajit-5.1-common pandoc pandoc-data python3-bleach python3-dateutil python3-entrypoints python3-html5lib python3-ipykernel python3-ipython python3-ipywidgets python3-jinja2 python3-jsonschema python3-jupyter-client python3-mistune python3-nbconvert python3-nbformat python3-notebook python3-pandocfilters python3-pickleshare python3-prompt-toolkit python3-pygments python3-simplegeneric python3-terminado python3-testpath python3-tornado python3-wcwidth python3-webencodings python3-zmq 0 upgraded, 52 newly installed, 0 to remove and 60 not upgraded. Need to get 20.7 MB of archives. After this operation, 142 MB of additional disk space will be used. Do you want to continue? [Y/n]
Setting up libjs-bootstrap-tour (0.12.0+dfsg-1) ... Setting up python3-notebook (5.2.2-1) ... Setting up jupyter-nbextension-jupyter-js-widgets (6.0.0-2) ... /usr/lib/python3.6/runpy.py:125: RuntimeWarning: 'notebook.nbextensions' found in sys.modules after import of package 'notebook', but prior to execution of 'notebook.nbextensions'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) Enabling notebook extension jupyter-js-widgets/extension... - Validating: OK Setting up jupyter-notebook (5.2.2-1) ... Setting up python3-ipywidgets (6.0.0-2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ...
user9@Latitude2:~$
jupyter notebook [I 05:23:54.607 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret [I 05:23:55.398 NotebookApp] Serving notebooks from local directory: /home/user9 [I 05:23:55.398 NotebookApp] 0 active kernels [I 05:23:55.398 NotebookApp] The Jupyter Notebook is running at: [I 05:23:55.399 NotebookApp]
http://localhost:8888/?token=f3e847ae72b205b350efa0739bfc0c575a44a52c4e02aa6...
[I 05:23:55.399 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 05:23:55.406 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time, to login with a token:
http://localhost:8888/?token=f3e847ae72b205b350efa0739bfc0c575a44a52c4e02aa6...
[I 05:23:58.884 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1 [Parent 5668, Gecko_IOThread] WARNING: pipe error (59): Connection reset by peer: file
/build/firefox-oscv9o/firefox-61.0.1+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc,
line 353
On 8/27/18, Jesus Mari Aguirre <jmariaguirre@gmail.com> wrote:
*a) https://www.nteract.io/ <https://www.nteract.io/>b) Pharo 6.1c) JuypterTalkd) kernel.json in /usr/local/share/jupyter/kernels/pharo *
OK, I'll keep in mind in my instalation script. I'll keep you informed.
Regarding on Windows instalation, probably it won't be so hard, It was very easy from Mac os X to Linux, I'm sure Windows will not be different.
El lun., 27 ago. 2018 a las 13:46, H. Hirzel (<hannes.hirzel@gmail.com>) escribió:
Thank you for the installation sequence. Good that you will add an installation script to your repository. If you label it as 'example installation script it gives people a clue what is involved and saves time. And they will know that it might not work in all cases or different solutions are possible.
Good to know how to get a python3.6 environment in Ubuntu 16.04.
My current Ubuntu 16.04 based distribution has
python3 --version Python 3.5.2
Just for trying I only did
sudo add-apt-repository ppa:deadsnakes/ppa pip3 install jupyter
and then
jupyter notebook
works.
But as you see from the mail to the list I am primarily interested in getting an easy to use installation sequence and it seems that the following
a) https://www.nteract.io/ b) Pharo 6.1 c) JuypterTalk d) kernel.json in /usr/local/share/jupyter/kernels/pharo
should be sufficient.
However at the moment I now have some working jupyter notebook installations and I will start to work with them. In particular I am interested in how to output html and svg contents from the Pharo kernel.
--Hannes
On 8/25/18, Jesus Mari Aguirre <jmariaguirre@gmail.com> wrote:
sorry... I press ctrl+tab in google mail... as I was saying I did:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.6 pip3 install jupyter
I think this was the sequence of commands
If you are going to use ipywidgets (still not supported by JupyterTalk) pip3 install ipywidgets jupyter nbextension enable --py widgetsnbextension
I'm preparing a bash script to make it easy, but jupyter is sometimes a pain in the neck.
El sáb., 25 ago. 2018 a las 21:07, Jesus Mari Aguirre (< jmariaguirre@gmail.com>) escribió:
I did: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.6 pip3 install jupyter
El sáb., 25 ago. 2018 a las 16:39, H. Hirzel (< hannes.hirzel@gmail.com ) escribió:
Hello Jesus Mari
On 8/25/18, Jesus Mari Aguirre <jmariaguirre@gmail.com> wrote:
I don't care about python version but Jupyter does. I think last version of Jupyter needs Python 3 and Pip3.
Going for Python 3 is what I do in Ubuntu 16.04 and Ubuntu 18.04
The second approach on http://jupyter.org/install for "experienced" python users (I am not is)
python3 -m pip install --upgrade pip
This leaves me with an unusable pip3
pip3 --version Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
So I did not upgrade pip and directly did
python3 -m pip install jupyter
In one installation this morning this worked, in another one in the evening (network quality was not so good) it did not work even after several tries. (details below)
I installed everything on Ubuntu 14. Good to know that you can even have it in Ubuntu 14. I use Ubuntu 16.04
How did you install Juypter in Ubuntu 14.04?
Could you please send me the result of
history | grep 'install jupyter'
- one installation was fine
- the other gave an error message.[1] Jupyter did not install. It bothers me that I cannot repeat the process easily. In the end something like a snap package which contains everything the necessary jupyter files and Pharo6.1 with JupyterTalk installed might be the way to go for installing it on different systems.
I'm very surprised you don't need to create the kernel.json file, I can not explain how does Jupyter starts Pharo without the path and arts to the Pharo VM...
That was in a third Ubuntu setup. It is probably caused by the installation sequence. I'll have to check again.
That is in Ubuntu 18.04 and I used
sudo apt-get install jupyter-core sudo apt-get install jupyter-notebook
Seems to be in the repository, but it was not sufficient.
This is why I like the *nteract* approach. One download which includes everything.
Webbrowser with notebook, node kernel.
--Hannes
El sáb., 25 ago. 2018 6:53, H. Hirzel <hannes.hirzel@gmail.com
escribió:
Hello Jesus Mari
For my JupyterTalk installation tests I have been using Ubuntu 18.04.1
so
far. Python 3.
My production environment is 16.04. So I still need to do the installation there.
Is your python environment version 2 or 3?
Regards Hannes
---------------------------
[1] user26@Latitude-E64102:~$ pip3 install jupyter Collecting jupyter Using cached
https://files.pythonhosted.org/packages/83/df/0f5dd132200728a86190397e1ea87c...
Collecting nbconvert (from jupyter) Using cached
https://files.pythonhosted.org/packages/39/ea/280d6c0d92f8e3ca15fd798bbcc2ea...
Collecting ipykernel (from jupyter) Using cached
https://files.pythonhosted.org/packages/ab/3f/cd624c835aa3336a9110d0a99e1507...
Collecting ipywidgets (from jupyter) Using cached
https://files.pythonhosted.org/packages/34/3a/5b258ea6d584f5a8527c2295d0ebf7...
Collecting notebook (from jupyter) Downloading
https://files.pythonhosted.org/packages/5e/7c/7fd8e9584779d65dfcad9fa2e09c76...
(8.9MB) 52% |âââââââââââââââââ | 4.7MB 50kB/s eta 0:01:22Exception: Traceback (most recent call last): File
"/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py",
line 226, in _error_catcher yield File
"/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py",
line 301, in read data = self._fp.read(amt) File
"/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/filewrapper.py",
line 49, in read data = self.__fp.read(amt) File "/usr/lib/python3.5/http/client.py", line 448, in read n = self.readinto(b) File "/usr/lib/python3.5/http/client.py", line 488, in readinto n = self.fp.readinto(b) File "/usr/lib/python3.5/socket.py", line 575, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.5/ssl.py", line 929, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.5/ssl.py", line 791, in read return self._sslobj.read(len, buffer) File "/usr/lib/python3.5/ssl.py", line 575, in read v = self._sslobj.read(len, buffer) socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 328, in run wb.build(autobuilding=True) File "/usr/lib/python3/dist-packages/pip/wheel.py", line 748, in build .... 231, in _error_catcher raise ReadTimeoutError(self._pool, None, 'Read timed out.') requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. You are using pip version 8.1.1, however version 18.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command.