Hi all,
After a lot of trying and going back and forth, reinstalling everything
I needed with pip2, I found out that what the actual problem was: for
4.0 and above one needs to install the notebook app seperately by doing:
$ pip install jupyter.
Seem to BigBang working now in a virtual machine, so if someone is going
through same issues as me am happy to share an image.
Cheers,
Niels
On 04/29/2016 08:28 PM, Niels ten Oever wrote:
> Hi all,
>
> I was getting several syntax errors in the notebooks and I assumed this
> was because ipython was installed for Python 3.4. So I uninstalled
> ipython both with apt-get and pip and installed ipython with pip2. Now
> my python and ipython seem to be in sync:
>
> $ python
> Python 2.7.9 (default, Mar 1 2015, 12:57:24)
> [GCC 4.9.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> exit()
>
>
> $ ipython
> Python 2.7.9 (default, Mar 1 2015, 12:57:24)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 4.2.0 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object', use 'object??' for extra details.
>
> In [1]: exit()
>
> but now I'm unable to start the notebooks:
>
> $ ipython notebook examples/
> [TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is
> deprecated and will be removed in future versions.
> [TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook`
> in the future
> Traceback (most recent call last):
> File "/usr/local/bin/ipython", line 11, in <module>
> sys.exit(start_ipython())
> File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py",
> line 119, in start_ipython
> return launch_new_instance(argv=argv, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 595, in launch_instance
> app.initialize(argv)
> File "<decorator-gen-111>", line 2, in initialize
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 74, in catch_config_error
> return method(app, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line
> 296, in initialize
> super(TerminalIPythonApp, self).initialize(argv)
> File "<decorator-gen-7>", line 2, in initialize
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 74, in catch_config_error
> return method(app, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/IPython/core/application.py",
> line 397, in initialize
> self.parse_command_line(argv)
> File
> "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line
> 291, in parse_command_line
> return super(TerminalIPythonApp, self).parse_command_line(argv)
> File "<decorator-gen-4>", line 2, in parse_command_line
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 74, in catch_config_error
> return method(app, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 488, in parse_command_line
> return self.initialize_subcommand(subc, subargv)
> File
> "/usr/local/lib/python2.7/dist-packages/IPython/core/application.py",
> line 207, in initialize_subcommand
> return super(BaseIPythonApplication,
> self).initialize_subcommand(subc, argv)
> File "<decorator-gen-3>", line 2, in initialize_subcommand
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 74, in catch_config_error
> return method(app, *args, **kwargs)
> File
> "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line
> 419, in initialize_subcommand
> subapp = import_item(subapp)
> File
> "/usr/local/lib/python2.7/dist-packages/ipython_genutils/importstring.py",
> line 31, in import_item
> module = __import__(package, fromlist=[obj])
> ImportError: No module named notebook.notebookapp
>
> Any suggestions?
>
> Best,
>
> Niels
>
>
> On 04/29/2016 07:41 PM, Niels ten Oever wrote:
>> Found it (after some searching), it seems the module 'cycler' is no
>> longer standard included in matploblib, can be simply installer with:
>>
>> $ pip install cycler
>>
>> The quest continuous.
>>
>> Cheers,
>>
>> Niels
>>
>> On 04/29/2016 04:19 PM, Niels ten Oever wrote:
>>> 3.
>>>
>>> I do not get the notebooks properly running, I have tried several but I
>>> think this comes back (again) to Python versions because what I get when
>>> I simply run the first line (%matplotlib inline) in 'Analyze Senders'is:
>>>
>>> [code]
>>>
>>> ImportError Traceback (most recent call last)
>>> <ipython-input-1-e27d371d6baa> in <module>()
>>> ----> 1 get_ipython().magic('matplotlib inline')
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py
>>> in magic(self, arg_s)
>>> 2161 magic_name, _, magic_arg_s = arg_s.partition(' ')
>>> 2162 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
>>> -> 2163 return self.run_line_magic(magic_name, magic_arg_s)
>>> 2164
>>> 2165
>>> #-------------------------------------------------------------------------
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py
>>> in run_line_magic(self, magic_name, line)
>>> 2082 kwargs['local_ns'] =
>>> sys._getframe(stack_depth).f_locals
>>> 2083 with self.builtin_trap:
>>> -> 2084 result = fn(*args,**kwargs)
>>> 2085 return result
>>> 2086
>>>
>>> <decorator-gen-106> in matplotlib(self, line)
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/magic.py in
>>> <lambda>(f, *a, **k)
>>> 191 # but it's overkill for just that one bit of state.
>>> 192 def magic_deco(arg):
>>> --> 193 call = lambda f, *a, **k: f(*a, **k)
>>> 194
>>> 195 if callable(arg):
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/magics/pylab.py in
>>> matplotlib(self, line)
>>> 98 print("Available matplotlib backends: %s" %
>>> backends_list)
>>> 99 else:
>>> --> 100 gui, backend = self.shell.enable_matplotlib(args.gui)
>>> 101 self._show_matplotlib_backend(args.gui, backend)
>>> 102
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py
>>> in enable_matplotlib(self, gui)
>>> 2937 """
>>> 2938 from IPython.core import pylabtools as pt
>>> -> 2939 gui, backend = pt.find_gui_and_backend(gui,
>>> self.pylab_gui_select)
>>> 2940
>>> 2941 if gui != 'inline':
>>>
>>> /usr/local/lib/python3.4/dist-packages/IPython/core/pylabtools.py in
>>> find_gui_and_backend(gui, gui_select)
>>> 256 """
>>> 257
>>> --> 258 import matplotlib
>>> 259
>>> 260 if gui and gui != 'auto':
>>>
>>> /usr/local/lib/python3.4/dist-packages/matplotlib-1.5.1-py3.4-linux-x86_64.egg/matplotlib/__init__.py
>>> in <module>()
>>> 122 from matplotlib.cbook import is_string_like, mplDeprecation,
>>> dedent, get_label
>>> 123 from matplotlib.compat import subprocess
>>> --> 124 from matplotlib.rcsetup import (defaultParams,
>>> 125 validate_backend,
>>> 126 cycler)
>>>
>>> /usr/local/lib/python3.4/dist-packages/matplotlib-1.5.1-py3.4-linux-x86_64.egg/matplotlib/rcsetup.py
>>> in <module>()
>>> 32
>>> 33 # Don't let the original cycler collide with our validating cycler
>>> ---> 34 from cycler import Cycler, cycler as ccycler
>>> 35
>>> 36 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'qt4agg',
>>>
>>> ImportError: No module named 'cycler'
>>>
>>> Import the BigBang modules as needed. These should be in your Python
>>> environment if you've installed BigBang correctly.
>>>
>>> [/code]
>>>
>>> I got similar output with other notebooks. I think this is because
>>> python 3.4 is being called.
>>>
>>> I tried:
>>> $ alias python=/usr/local/bin/python2.7
>>> and
>>> $ ipython notebook examples/
>>>
>>> But that does not seem to work. Any suggestions on how I can make
>>> ipython (or the notebooks) use python2 ?
>>
>
--
Niels ten Oever
Head of Digital
Article 19
www.article19.org
PGP fingerprint 8D9F C567 BEE4 A431 56C4
678B 08B5 A0F2 636D 68E9
_______________________________________________
BigBang-user mailing list
BigBang-user@lists.sudoroom.org
https://sudoroom.org/lists/listinfo/bigbang-user