Skip to content

Instantly share code, notes, and snippets.

@x10an14
Last active September 5, 2016 06:12
Show Gist options
  • Save x10an14/7c8597ff45409e3812638b1b67b5de49 to your computer and use it in GitHub Desktop.
Save x10an14/7c8597ff45409e3812638b1b67b5de49 to your computer and use it in GitHub Desktop.
Attempt at starting IPython Coconut shell/console on Windows
C:\> cd .\coconut\
C:\coconut> virtualenv.exe -p "C:\Program Files\Python35\python.exe" venv
Running virtualenv with interpreter C:\Program Files\Python35\python.exe
Using base prefix 'C:\\Program Files\\Python35'
New python executable in C:\coconut\venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.
C:\coconut> .\venv\Scripts\pip install ipython jupyter coconut --trusted-host pypi.python.org
Collecting ipython
Downloading ipython-5.1.0-py3-none-any.whl (747kB)
100% |████████████████████████████████| 747kB 6.0MB/s ████████████████| 747kB 6.0MB/s �█████| 747kB 6.0MB/s B 6.0MB/s
Collecting jupyter
Downloading jupyter-1.0.0-py2.py3-none-any.whl
Collecting coconut
Downloading coconut-1.1.1-py2.py3-none-any.whl (46kB)
100% |████████████████████████████████| 51kB 5.7MB/s �████████████████| 51kB 5.7MB/s ��█████| 51kB 5.7MB/s B 5.7MB/s
Collecting win-unicode-console>=0.5; sys_platform == "win32" (from ipython)
Collecting pygments (from ipython)
Downloading Pygments-2.1.3-py2.py3-none-any.whl (755kB)
100% |████████████████████████████████| 757kB 6.8MB/s ████████████████| 757kB 6.8MB/s �█████| 757kB 6.8MB/s B 6.8MB/s
Collecting prompt-toolkit<2.0.0,>=1.0.3 (from ipython)
Downloading prompt_toolkit-1.0.7-py3-none-any.whl (237kB)
100% |████████████████████████████████| 245kB 7.3MB/s ████████████████| 245kB 7.3MB/s �█████| 245kB 7.3MB/s B 7.3MB/s
Collecting simplegeneric>0.8 (from ipython)
Collecting decorator (from ipython)
Downloading decorator-4.0.10-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in c:\coconut\venv\lib\site-packages (from ipython)
Collecting pickleshare (from ipython)
Downloading pickleshare-0.7.4-py2.py3-none-any.whl
Collecting colorama; sys_platform == "win32" (from ipython)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting traitlets>=4.2 (from ipython)
Downloading traitlets-4.2.2-py2.py3-none-any.whl (68kB)
100% |████████████████████████████████| 71kB 5.5MB/s �████████████████| 71kB 5.5MB/s ��█████| 71kB 5.5MB/s B 5.5MB/s
Collecting ipywidgets (from jupyter)
Downloading ipywidgets-5.2.2-py2.py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 8.5MB/s �████████████████| 51kB 8.5MB/s ��█████| 51kB 8.5MB/s B 8.5MB/s
Collecting nbconvert (from jupyter)
Downloading nbconvert-4.2.0-py2.py3-none-any.whl (319kB)
100% |████████████████████████████████| 327kB 7.9MB/s ████████████████| 327kB 7.9MB/s �█████| 327kB 7.9MB/s B 7.9MB/s
Collecting notebook (from jupyter)
Downloading notebook-4.2.2-py2.py3-none-any.whl (6.7MB)
100% |████████████████████████████████| 6.7MB 6.4MB/s ████████████████| 6.7MB 6.4MB/s �█████| 6.7MB 6.4MB/s B 6.4MB/s
Collecting qtconsole (from jupyter)
Downloading qtconsole-4.2.1-py2.py3-none-any.whl (104kB)
100% |████████████████████████████████| 112kB 7.9MB/s ████████████████| 112kB 7.9MB/s �█████| 112kB 7.9MB/s B 7.9MB/s
Collecting ipykernel (from jupyter)
Downloading ipykernel-4.5.0-py2.py3-none-any.whl (97kB)
100% |████████████████████████████████| 102kB 7.3MB/s ████████████████| 102kB 7.3MB/s �█████| 102kB 7.3MB/s B 7.3MB/s
Collecting jupyter-console (from jupyter)
Downloading jupyter_console-5.0.0-py2.py3-none-any.whl
Collecting pyparsing==2.1.5 (from coconut)
Downloading pyparsing-2.1.5-py2.py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 5.7MB/s �████████████████| 51kB 5.7MB/s ��█████| 51kB 5.7MB/s B 5.7MB/s
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.3->ipython)
Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Collecting six>=1.9.0 (from prompt-toolkit<2.0.0,>=1.0.3->ipython)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets>=4.2->ipython)
Downloading ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter)
Downloading widgetsnbextension-1.2.6-py2.py3-none-any.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 7.3MB/s ████████████████| 1.5MB 7.3MB/s �█████| 1.5MB 7.3MB/s B 7.3MB/s
Collecting jupyter-core (from nbconvert->jupyter)
Downloading jupyter_core-4.1.1-py2.py3-none-any.whl (76kB)
100% |████████████████████████████████| 81kB 6.8MB/s �████████████████| 81kB 6.8MB/s ��█████| 81kB 6.8MB/s B 6.8MB/s
Collecting entrypoints (from nbconvert->jupyter)
Downloading entrypoints-0.2.2-py2.py3-none-any.whl
Collecting jinja2 (from nbconvert->jupyter)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |████████████████████████████████| 266kB 6.8MB/s ████████████████| 266kB 6.8MB/s �█████| 266kB 6.8MB/s B 6.8MB/s
Collecting mistune!=0.6 (from nbconvert->jupyter)
Downloading mistune-0.7.3-py2.py3-none-any.whl
Collecting nbformat (from nbconvert->jupyter)
Downloading nbformat-4.1.0-py2.py3-none-any.whl (140kB)
100% |████████████████████████████████| 143kB 7.9MB/s ████████████████| 143kB 7.9MB/s �█████| 143kB 7.9MB/s B 7.9MB/s
Collecting jupyter-client (from notebook->jupyter)
Downloading jupyter_client-4.4.0-py2.py3-none-any.whl (76kB)
100% |████████████████████████████████| 81kB 6.8MB/s �████████████████| 81kB 6.8MB/s ��█████| 81kB 6.8MB/s B 6.8MB/s
Collecting tornado>=4 (from notebook->jupyter)
Downloading tornado-4.4.1-cp35-cp35m-win_amd64.whl (404kB)
100% |████████████████████████████████| 409kB 6.8MB/s ████████████████| 409kB 6.8MB/s �█████| 409kB 6.8MB/s B 6.8MB/s
Collecting MarkupSafe (from jinja2->nbconvert->jupyter)
Collecting jsonschema!=2.5.0,>=2.0 (from nbformat->nbconvert->jupyter)
Downloading jsonschema-2.5.1-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->notebook->jupyter)
Downloading pyzmq-15.4.0-cp35-cp35m-win_amd64.whl (893kB)
100% |████████████████████████████████| 901kB 6.4MB/s ████████████████| 901kB 6.4MB/s �█████| 901kB 6.4MB/s B 6.4MB/s
Installing collected packages: win-unicode-console, pygments, wcwidth, six, prompt-toolkit, simplegeneric, decorator, pickleshare, colorama, ipython-genutils, traitlets, ipython, jupyter-core, MarkupSafe, jinja2, entrypoints, mistune, jsonschema, nbformat, nbconvert, pyzmq, jupyter-client, tornado, ipykernel, notebook, widgetsnbextension, ipywidgets, qtconsole, jupyter-console, jupyter, pyparsing, coconut
Successfully installed MarkupSafe-0.23 coconut-1.1.1 colorama-0.3.7 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 pickleshare-0.7.4 prompt-toolkit-1.0.7 pygments-2.1.3 pyparsing-2.1.5 pyzmq-15.4.0 qtconsole-4.2.1 simplegeneric-0.8.1 six-1.10.0 tornado-4.4.1 traitlets-4.2.2 wcwidth-0.1.7 widgetsnbextension-1.2.6 win-unicode-console-0.5
C:\coconut> .\venv\Scripts\coconut --verbose --ipython console
> jupyter --version
4.1.1
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut --replace
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut --replace --user
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 607, in start_jupyter
install_func(install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut', '--replace']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 612, in start_jupyter
install_func(user_install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut', '--replace', '--user']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\compiler.py", line 1450, in warn
raise warning
coconut.compiler.CoconutWarning: unable to install Jupyter kernel specification file (failed command "jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut --replace")
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut2 --replace
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut2 --replace --user
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 607, in start_jupyter
install_func(install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut2', '--replace']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 612, in start_jupyter
install_func(user_install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut2', '--replace', '--user']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\compiler.py", line 1450, in warn
raise warning
coconut.compiler.CoconutWarning: unable to install Jupyter kernel specification file (failed command "jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut2 --replace")
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut3 --replace
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
> jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut3 --replace --user
'jupyter-kernelspec' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 607, in start_jupyter
install_func(install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut3', '--replace']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 612, in start_jupyter
install_func(user_install_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['jupyter', 'kernelspec', 'install', 'c:\\coconut\\venv\\lib\\site-packages\\coconut\\icoconut\\coconut3', '--replace', '--user']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\coconut\venv\lib\site-packages\coconut\compiler.py", line 1450, in warn
raise warning
coconut.compiler.CoconutWarning: unable to install Jupyter kernel specification file (failed command "jupyter kernelspec install c:\coconut\venv\lib\site-packages\coconut\icoconut\coconut3 --replace")
> python3 -m coconut --version
Traceback (most recent call last):
File "C:\Program Files\Python35\Lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\Python35\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\coconut\venv\Scripts\coconut.exe\__main__.py", line 9, in <module>
File "c:\coconut\venv\lib\site-packages\coconut\__main__.py", line 32, in main
cli().start()
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 286, in start
self.cmd(self.commandline.parse_args())
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 367, in cmd
self.start_jupyter(args.jupyter)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 625, in start_jupyter
install_func(check_args)
File "c:\coconut\venv\lib\site-packages\coconut\command.py", line 594, in <lambda>
install_func = lambda args: subprocess.check_call(args)
File "C:\Program Files\Python35\Lib\subprocess.py", line 576, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files\Python35\Lib\subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files\Python35\Lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python35\Lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
C:\coconut> .\venv\Scripts\pip freeze
coconut==1.1.1
colorama==0.3.7
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
MarkupSafe==0.23
mistune==0.7.3
nbconvert==4.2.0
nbformat==4.1.0
notebook==4.2.2
pickleshare==0.7.4
prompt-toolkit==1.0.7
Pygments==2.1.3
pyparsing==2.1.5
pyzmq==15.4.0
qtconsole==4.2.1
simplegeneric==0.8.1
six==1.10.0
tornado==4.4.1
traitlets==4.2.2
wcwidth==0.1.7
widgetsnbextension==1.2.6
win-unicode-console==0.5
C:\coconut>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment