Skip to content

Instantly share code, notes, and snippets.

@x10an14
Last active September 6, 2016 19:53
Show Gist options
  • Save x10an14/2555fc22eb4d862143e56a02239e64c2 to your computer and use it in GitHub Desktop.
Save x10an14/2555fc22eb4d862143e56a02239e64c2 to your computer and use it in GitHub Desktop.
Coconut console attempt with activated virtualenv on Linux
x10an14@x10Desktop2016:~$ cd Documents/coconut/
x10an14@x10Desktop2016:~/Documents/coconut$ la
total 36K
drwxrwxr-x 3 x10an14 x10an14 4,0K sep. 4 22:15 ./
drwxr-xr-x 6 x10an14 x10an14 4,0K sep. 4 21:43 ../
-rw-rw-r-- 1 x10an14 x10an14 41 sep. 4 21:48 hello_world.coco
-rw-rw-r-- 1 x10an14 x10an14 15K sep. 4 21:48 hello_world.py
-rw-rw-r-- 1 x10an14 x10an14 53 sep. 4 22:08 requirements.txt
drwxrwxr-x 6 x10an14 x10an14 4,0K sep. 4 22:15 venv/
x10an14@x10Desktop2016:~/Documents/coconut$ rm -rf venv
x10an14@x10Desktop2016:~/Documents/coconut$ virtualenv -p python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/x10an14/Documents/coconut/venv/bin/python3
Also creating executable in /home/x10an14/Documents/coconut/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
x10an14@x10Desktop2016:~/Documents/coconut$ source venv/bin/activate
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ pip install jupyter coconut
Collecting jupyter
Using cached jupyter-1.0.0-py2.py3-none-any.whl
Collecting coconut
Using cached coconut-1.1.1-py2.py3-none-any.whl
Collecting qtconsole (from jupyter)
Using cached qtconsole-4.2.1-py2.py3-none-any.whl
Collecting nbconvert (from jupyter)
Using cached nbconvert-4.2.0-py2.py3-none-any.whl
Collecting ipykernel (from jupyter)
Using cached ipykernel-4.5.0-py2.py3-none-any.whl
Collecting ipywidgets (from jupyter)
Using cached ipywidgets-5.2.2-py2.py3-none-any.whl
Collecting notebook (from jupyter)
Using cached notebook-4.2.2-py2.py3-none-any.whl
Collecting jupyter-console (from jupyter)
Using cached jupyter_console-5.0.0-py2.py3-none-any.whl
Collecting pyparsing==2.1.5 (from coconut)
Using cached pyparsing-2.1.5-py2.py3-none-any.whl
Collecting traitlets (from qtconsole->jupyter)
Using cached traitlets-4.2.2-py2.py3-none-any.whl
Collecting pygments (from qtconsole->jupyter)
Using cached Pygments-2.1.3-py2.py3-none-any.whl
Collecting jupyter-core (from qtconsole->jupyter)
Using cached jupyter_core-4.1.1-py2.py3-none-any.whl
Collecting jupyter-client>=4.1 (from qtconsole->jupyter)
Using cached jupyter_client-4.4.0-py2.py3-none-any.whl
Collecting jinja2 (from nbconvert->jupyter)
Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting mistune!=0.6 (from nbconvert->jupyter)
Using cached mistune-0.7.3-py2.py3-none-any.whl
Collecting entrypoints (from nbconvert->jupyter)
Using cached entrypoints-0.2.2-py2.py3-none-any.whl
Collecting nbformat (from nbconvert->jupyter)
Using cached nbformat-4.1.0-py2.py3-none-any.whl
Collecting tornado>=4.0 (from ipykernel->jupyter)
Collecting ipython>=4.0.0 (from ipykernel->jupyter)
Using cached ipython-5.1.0-py3-none-any.whl
Collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter)
Using cached widgetsnbextension-1.2.6-py2.py3-none-any.whl
Collecting ipython-genutils (from notebook->jupyter)
Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting terminado>=0.3.3; sys_platform != "win32" (from notebook->jupyter)
Collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter)
Using cached prompt_toolkit-1.0.7-py3-none-any.whl
Collecting decorator (from traitlets->qtconsole->jupyter)
Using cached decorator-4.0.10-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client>=4.1->qtconsole->jupyter)
Using cached pyzmq-15.4.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting MarkupSafe (from jinja2->nbconvert->jupyter)
Collecting jsonschema!=2.5.0,>=2.0 (from nbformat->nbconvert->jupyter)
Using cached jsonschema-2.5.1-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython>=4.0.0->ipykernel->jupyter)
Collecting pickleshare (from ipython>=4.0.0->ipykernel->jupyter)
Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in ./venv/lib/python3.5/site-packages (from ipython>=4.0.0->ipykernel->jupyter)
Collecting pexpect; sys_platform != "win32" (from ipython>=4.0.0->ipykernel->jupyter)
Using cached pexpect-4.2.1-py2.py3-none-any.whl
Collecting ptyprocess (from terminado>=0.3.3; sys_platform != "win32"->notebook->jupyter)
Using cached ptyprocess-0.5.1-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter)
Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Collecting six>=1.9.0 (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: decorator, ipython-genutils, traitlets, pygments, tornado, jupyter-core, pyzmq, jupyter-client, simplegeneric, wcwidth, six, prompt-toolkit, pickleshare, ptyprocess, pexpect, ipython, ipykernel, qtconsole, MarkupSafe, jinja2, mistune, entrypoints, jsonschema, nbformat, nbconvert, terminado, notebook, widgetsnbextension, ipywidgets, jupyter-console, jupyter, pyparsing, coconut
Successfully installed MarkupSafe-0.23 coconut-1.1.1 decorator-4.0.10 entrypoints-0.2.2 ipykernel-4.5.0 ipython-5.1.0 ipython-genutils-0.1.0 ipywidgets-5.2.2 jinja2-2.8 jsonschema-2.5.1 jupyter-1.0.0 jupyter-client-4.4.0 jupyter-console-5.0.0 jupyter-core-4.1.1 mistune-0.7.3 nbconvert-4.2.0 nbformat-4.1.0 notebook-4.2.2 pexpect-4.2.1 pickleshare-0.7.4 prompt-toolkit-1.0.7 ptyprocess-0.5.1 pygments-2.1.3 pyparsing-2.1.5 pyzmq-15.4.0 qtconsole-4.2.1 simplegeneric-0.8.1 six-1.10.0 terminado-0.6 tornado-4.4.1 traitlets-4.2.2 wcwidth-0.1.7 widgetsnbextension-1.2.6
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ pip install -U jupyter-console=4.1.1
Invalid requirement: 'jupyter-console=4.1.1'
= is not a valid operator. Did you mean == ?
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ pip install -U jupyter-console==4.1.1
Collecting jupyter-console==4.1.1
Downloading jupyter_console-4.1.1-py2.py3-none-any.whl
Requirement already up-to-date: ipykernel in ./venv/lib/python3.5/site-packages (from jupyter-console==4.1.1)
Requirement already up-to-date: ipython in ./venv/lib/python3.5/site-packages (from jupyter-console==4.1.1)
Requirement already up-to-date: jupyter-client in ./venv/lib/python3.5/site-packages (from jupyter-console==4.1.1)
Requirement already up-to-date: traitlets>=4.1.0 in ./venv/lib/python3.5/site-packages (from ipykernel->jupyter-console==4.1.1)
Requirement already up-to-date: tornado>=4.0 in ./venv/lib/python3.5/site-packages (from ipykernel->jupyter-console==4.1.1)
Requirement already up-to-date: pygments in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: prompt-toolkit<2.0.0,>=1.0.3 in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: pexpect; sys_platform != "win32" in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: pickleshare in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: simplegeneric>0.8 in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: setuptools>=18.5 in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: decorator in ./venv/lib/python3.5/site-packages (from ipython->jupyter-console==4.1.1)
Requirement already up-to-date: jupyter-core in ./venv/lib/python3.5/site-packages (from jupyter-client->jupyter-console==4.1.1)
Requirement already up-to-date: pyzmq>=13 in ./venv/lib/python3.5/site-packages (from jupyter-client->jupyter-console==4.1.1)
Requirement already up-to-date: ipython-genutils in ./venv/lib/python3.5/site-packages (from traitlets>=4.1.0->ipykernel->jupyter-console==4.1.1)
Requirement already up-to-date: wcwidth in ./venv/lib/python3.5/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython->jupyter-console==4.1.1)
Requirement already up-to-date: six>=1.9.0 in ./venv/lib/python3.5/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython->jupyter-console==4.1.1)
Requirement already up-to-date: ptyprocess>=0.5 in ./venv/lib/python3.5/site-packages (from pexpect; sys_platform != "win32"->ipython->jupyter-console==4.1.1)
Installing collected packages: jupyter-console
Found existing installation: jupyter-console 5.0.0
Uninstalling jupyter-console-5.0.0:
Successfully uninstalled jupyter-console-5.0.0
Successfully installed jupyter-console-4.1.1
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ pip freeze
coconut==1.1.1
decorator==4.0.10
entrypoints==0.2.2
ipykernel==4.5.0
ipython==5.1.0
ipython-genutils==0.1.0
ipywidgets==5.2.2
Jinja2==2.8
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.4.0
jupyter-console==4.1.1
jupyter-core==4.1.1
MarkupSafe==0.23
mistune==0.7.3
nbconvert==4.2.0
nbformat==4.1.0
notebook==4.2.2
pexpect==4.2.1
pickleshare==0.7.4
pkg-resources==0.0.0
prompt-toolkit==1.0.7
ptyprocess==0.5.1
Pygments==2.1.3
pyparsing==2.1.5
pyzmq==15.4.0
qtconsole==4.2.1
simplegeneric==0.8.1
six==1.10.0
terminado==0.6
tornado==4.4.1
traitlets==4.2.2
wcwidth==0.1.7
widgetsnbextension==1.2.6
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ coconut --ipython console
Coconut 1.1.1 [Brontosaurus]
Traceback (most recent call last):
File "/home/x10an14/Documents/coconut/venv/bin/jupyter-console", line 11, in <module>
sys.exit(main())
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "<decorator-gen-113>", line 2, in initialize
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/app.py", line 138, in initialize
self.init_shell()
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/app.py", line 111, in init_shell
client=self.kernel_client,
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/interactiveshell.py", line 135, in __init__
super(ZMQTerminalInteractiveShell, self).__init__(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py", line 396, in __init__
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 495, in __init__
self.init_completer()
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/interactiveshell.py", line 160, in init_completer
if self.has_readline:
AttributeError: 'ZMQTerminalInteractiveShell' object has no attribute 'has_readline'
(venv) x10an14@x10Desktop2016:~/Documents/coconut$ coconut --verbose --ipython console
> jupyter --version
4.1.1
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut --replace
[Errno 13] Permission denied: '/usr/local/share/jupyter'
Perhaps you want to install with `sudo` or `--user`?
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut --replace --user
[InstallKernelSpec] Removing existing kernelspec in /home/x10an14/.local/share/jupyter/kernels/coconut
[InstallKernelSpec] Installed kernelspec coconut in /home/x10an14/.local/share/jupyter/kernels/coconut
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut2 --replace
[Errno 13] Permission denied: '/usr/local/share/jupyter'
Perhaps you want to install with `sudo` or `--user`?
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut2 --replace --user
[InstallKernelSpec] Removing existing kernelspec in /home/x10an14/.local/share/jupyter/kernels/coconut2
[InstallKernelSpec] Installed kernelspec coconut2 in /home/x10an14/.local/share/jupyter/kernels/coconut2
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut3 --replace
[Errno 13] Permission denied: '/usr/local/share/jupyter'
Perhaps you want to install with `sudo` or `--user`?
> jupyter kernelspec install /home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/coconut/icoconut/coconut3 --replace --user
[InstallKernelSpec] Removing existing kernelspec in /home/x10an14/.local/share/jupyter/kernels/coconut3
[InstallKernelSpec] Installed kernelspec coconut3 in /home/x10an14/.local/share/jupyter/kernels/coconut3
> python3 -m coconut --version
Coconut: Version 1.1.1 [Brontosaurus] running on Python 3.5.2 (default, Jul 5 2016, 12:43:10) [GCC 5.4.0 20160609]
Coconut 1.1.1 [Brontosaurus]
> jupyter console --kernel coconut3
Traceback (most recent call last):
File "/home/x10an14/Documents/coconut/venv/bin/jupyter-console", line 11, in <module>
sys.exit(main())
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "<decorator-gen-113>", line 2, in initialize
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/app.py", line 138, in initialize
self.init_shell()
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/app.py", line 111, in init_shell
client=self.kernel_client,
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/interactiveshell.py", line 135, in __init__
super(ZMQTerminalInteractiveShell, self).__init__(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py", line 396, in __init__
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 495, in __init__
self.init_completer()
File "/home/x10an14/Documents/coconut/venv/lib/python3.5/site-packages/jupyter_console/interactiveshell.py", line 160, in init_completer
if self.has_readline:
AttributeError: 'ZMQTerminalInteractiveShell' object has no attribute 'has_readline'
(venv) x10an14@x10Desktop2016:~/Documents/coconut$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment