MTK Installer

Added by Jeremy Wright almost 9 years ago

FYI - I've renamed our original installer script to mtk_setup_script_Ubuntu_14_04_Sage.sh and started over again with the IPython version in mtk_setup_script.sh


Replies (39)

RE: MTK Installer - Added by J. Simmons over 8 years ago

jrs@ubuntu:~$ python
Python 3.4.3 |Anaconda 2.3.0 (64-bit)| (default, Jun  4 2015, 15:29:08) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pint
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'pint'

Running pip install pint and then restarting the NB server fixed the issue.

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

So what's different about that pip install pint in relation to the line that's in the script? It must have somehow run inside the system's 2.7 Python environment instead of the Anaconda environment.

RE: MTK Installer - Added by J. Simmons over 8 years ago

So, the line from the installer is pip install pint. I am guessing it should be ~/anaconda3/bin/pip install pint in order to use the Anaconda copy of pip (due to that .bashrc issue you commented on earlier). Also, I lost my NB extensions directory somewhere during my testing (I think I might have lost it when I aborted an install that skipped Anaconda and then tried to run it again without wiping my VM). We should keep an eye on that. I would also like to look at whether there is a more global (read inside the Anaconda distro) location to store NB extensions so they ride along with the other Python related code we are installing.

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

Ok, like what I did with conda in the script, that makes sense. I'll make that change.

RE: MTK Installer - Added by J. Simmons over 8 years ago

Yup. And please remember to uncomment the lines to install Anaconda. ;)

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

Yeah, I was determined not to forget that again. I'm going to try the latest version on a fresh VM.

RE: MTK Installer - Added by J. Simmons over 8 years ago

Cool. Here is my MTK Test 03 notebook. You can try running it when you get installed (note the comments on the other thread about PDF export and trusting the NB).

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

The script is really close. Everything works except that the extensions are extracted to the Download directory. It has trouble switching to the .ipython directory for some reason during the install. I'll fix that tomorrow.

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

Ok, it looks like the ~/.ipython directory is not created until you run IPython for the first time. I'll have to figure out the best way to run what's needed to init the directory structure from the script.

RE: MTK Installer - Added by J. Simmons over 8 years ago

Looking here there are signs that we can both override the NB extensions location and preload standard extensions in custom.js. I wonder where the template copy of that file lives...

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

Made a couple of adjustments to the script this morning and then tried it on a fresh VM. Everything works correctly after installation, extensions, PDF export, etc.

J - I'm going to need an explanation of the why and where for changing the NB extensions location. I don't understand the advantage when Anaconda seems to install everything at the user level.

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

I've run out of time this week I think, but I did make some progress. The latest commit of installer now puts Anaconda in /opt and the IPython profile/config directory in /usr/local/share/ipython. I have not gotten a chance to have the extensions loaded in config.js though.

RE: MTK Installer - Added by Jeremy Wright over 8 years ago

So, the Linux installer script works and the nbextensions load fine. However, when I try to open and execute the sample notebook we've been using, I get an error in the browser console that seems to related to the notebook version (3.x). The error is similar to what J and I experienced in the #ES Hangout last night. If I create a blank notebook with Jupyter 4.x and copy the code and markdown from the 3.x notebook into it, everything executes correctly. When I view the meta data for the old notebook, it shows that it is indeed version 3.x. I'm not sure if there's an easy way to upgrade notebooks from 3.x to 4.x.

The error I get with the 3.x notebook.

SyntaxError: invalid property id

« Previous 1 2 (26-39/39)