package management - install Jupyter for Python 2.7 in Ubuntu 14.04 - Ask Ubuntu
how can install jupyter python 2.7 in ubuntu 14.04?
i try:
sudo add-apt-repository ppa:jolicloud-team/ppa sudo apt-get update
the output update:
ign file: inrelease get:1 file: release.gpg [181 b] get:2 file: release [196 b] ign file: translation-en_us ign file: translation-en hit http://storage.googleapis.com stable inrelease ign http://us.archive.ubuntu.com trusty/universe translation-en_us fetched 5,905 kb in 6s (915 kb/s) w: failed fetch http://ppa.launchpad.net/jolicloud-team/ppa/ubuntu/dists/trusty/main/binary-amd64/packages 404 not found w: failed fetch http://ppa.launchpad.net/jolicloud-team/ppa/ubuntu/dists/trusty/main/binary-i386/packages 404 not found e: index files failed download. have been ignored, or old ones used instead.
and then:
sudo apt-get install jupiter
output:
reading package lists... done building dependency tree reading state information... done e: unable locate package jupiter
update:
mona@pascal:~/computer_vision/imgur$ sudo python -m pip install --upgrade --force-reinstall pip directory '/home/mona/.cache/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. directory '/home/mona/.cache/pip' or parent directory not owned current user , caching wheels has been disabled. check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. collecting pip /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: snimissingwarning: https request has been made, sni (subject name indication) extension tls not available on platform. may cause server present incorrect tls certificate, can cause validation failures. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. snimissingwarning /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: insecureplatformwarning: true sslcontext object not available. prevents urllib3 configuring ssl appropriately , may cause ssl connections fail. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. insecureplatformwarning downloading pip-9.0.1-py2.py3-none-any.whl (1.3mb) 100% |████████████████████████████████| 1.3mb 721kb/s installing collected packages: pip found existing installation: pip 9.0.1 uninstalling pip-9.0.1: uninstalled pip-9.0.1 installed pip-9.0.1 /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: insecureplatformwarning: true sslcontext object not available. prevents urllib3 configuring ssl appropriately , may cause ssl connections fail. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. insecureplatformwarning mona@pascal:~/computer_vision/imgur$ sudo -h pip install jupyter collecting jupyter /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: snimissingwarning: https request has been made, sni (subject name indication) extension tls not available on platform. may cause server present incorrect tls certificate, can cause validation failures. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. snimissingwarning /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: insecureplatformwarning: true sslcontext object not available. prevents urllib3 configuring ssl appropriately , may cause ssl connections fail. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. insecureplatformwarning downloading jupyter-1.0.0-py2.py3-none-any.whl collecting ipywidgets (from jupyter) downloading ipywidgets-5.2.2-py2.py3-none-any.whl (43kb) 100% |████████████████████████████████| 51kb 1.1mb/s collecting qtconsole (from jupyter) downloading qtconsole-4.2.1-py2.py3-none-any.whl (104kb) 100% |████████████████████████████████| 112kb 2.1mb/s collecting nbconvert (from jupyter) downloading nbconvert-4.2.0-py2.py3-none-any.whl (319kb) 100% |████████████████████████████████| 327kb 1.6mb/s collecting notebook (from jupyter) downloading notebook-4.2.3-py2.py3-none-any.whl (6.7mb) 100% |████████████████████████████████| 6.7mb 154kb/s collecting jupyter-console (from jupyter) downloading jupyter_console-5.0.0-py2.py3-none-any.whl collecting ipykernel (from jupyter) downloading ipykernel-4.5.0-py2.py3-none-any.whl (97kb) 100% |████████████████████████████████| 102kb 5.2mb/s collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter) downloading widgetsnbextension-1.2.6-py2.py3-none-any.whl (1.5mb) 100% |████████████████████████████████| 1.5mb 674kb/s collecting ipython>=4.0.0 (from ipywidgets->jupyter) downloading ipython-5.1.0-py2-none-any.whl (747kb) 100% |████████████████████████████████| 747kb 1.2mb/s collecting traitlets>=4.2.1 (from ipywidgets->jupyter) downloading traitlets-4.3.1-py2.py3-none-any.whl (74kb) 100% |████████████████████████████████| 81kb 5.2mb/s collecting pygments (from qtconsole->jupyter) downloading pygments-2.1.3-py2.py3-none-any.whl (755kb) 100% |████████████████████████████████| 757kb 1.2mb/s collecting jupyter-client>=4.1 (from qtconsole->jupyter) downloading jupyter_client-4.4.0-py2.py3-none-any.whl (76kb) 100% |████████████████████████████████| 81kb 5.0mb/s collecting jupyter-core (from qtconsole->jupyter) downloading jupyter_core-4.2.0-py2.py3-none-any.whl (76kb) 100% |████████████████████████████████| 81kb 5.4mb/s collecting entrypoints (from nbconvert->jupyter) downloading entrypoints-0.2.2-py2.py3-none-any.whl collecting nbformat (from nbconvert->jupyter) downloading nbformat-4.1.0-py2.py3-none-any.whl (140kb) 100% |████████████████████████████████| 143kb 4.0mb/s requirement satisfied: jinja2 in /usr/lib/python2.7/dist-packages (from nbconvert->jupyter) collecting mistune!=0.6 (from nbconvert->jupyter) downloading mistune-0.7.3-py2.py3-none-any.whl collecting terminado>=0.3.3; sys_platform != "win32" (from notebook->jupyter) downloading terminado-0.6.tar.gz collecting tornado>=4 (from notebook->jupyter) downloading tornado-4.4.2.tar.gz (460kb) 100% |████████████████████████████████| 460kb 1.9mb/s collecting ipython-genutils (from notebook->jupyter) downloading ipython_genutils-0.1.0-py2.py3-none-any.whl collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter) downloading prompt_toolkit-1.0.9-py2-none-any.whl (241kb) 100% |████████████████████████████████| 245kb 2.7mb/s requirement satisfied: decorator in /usr/local/lib/python2.7/dist-packages (from ipython>=4.0.0->ipywidgets->jupyter) requirement satisfied: setuptools>=18.5 in /usr/local/lib/python2.7/dist-packages (from ipython>=4.0.0->ipywidgets->jupyter) collecting pickleshare (from ipython>=4.0.0->ipywidgets->jupyter) downloading pickleshare-0.7.4-py2.py3-none-any.whl collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython>=4.0.0->ipywidgets->jupyter) downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl requirement satisfied: pexpect; sys_platform != "win32" in /usr/lib/python2.7/dist-packages (from ipython>=4.0.0->ipywidgets->jupyter) collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython>=4.0.0->ipywidgets->jupyter) downloading pathlib2-2.1.0-py2.py3-none-any.whl requirement satisfied: simplegeneric>0.8 in /usr/lib/python2.7/dist-packages (from ipython>=4.0.0->ipywidgets->jupyter) requirement satisfied: 6 in /usr/local/lib/python2.7/dist-packages (from traitlets>=4.2.1->ipywidgets->jupyter) collecting enum34; python_version == "2.7" (from traitlets>=4.2.1->ipywidgets->jupyter) downloading enum34-1.1.6-py2-none-any.whl requirement satisfied: pyzmq>=13 in /usr/lib/python2.7/dist-packages (from jupyter-client>=4.1->qtconsole->jupyter) collecting configparser>=3.5; python_version == "2.7" (from entrypoints->nbconvert->jupyter) downloading configparser-3.5.0.tar.gz collecting jsonschema!=2.5.0,>=2.0 (from nbformat->nbconvert->jupyter) downloading jsonschema-2.5.1-py2.py3-none-any.whl requirement satisfied: markupsafe in /usr/lib/python2.7/dist-packages (from jinja2->nbconvert->jupyter) collecting ptyprocess (from terminado>=0.3.3; sys_platform != "win32"->notebook->jupyter) downloading ptyprocess-0.5.1-py2.py3-none-any.whl collecting backports.ssl_match_hostname (from tornado>=4->notebook->jupyter) downloading backports.ssl_match_hostname-3.5.0.1.tar.gz collecting singledispatch (from tornado>=4->notebook->jupyter) downloading singledispatch-3.4.0.3-py2.py3-none-any.whl collecting certifi (from tornado>=4->notebook->jupyter) downloading certifi-2016.9.26-py2.py3-none-any.whl (377kb) 100% |████████████████████████████████| 378kb 2.1mb/s collecting backports_abc>=0.4 (from tornado>=4->notebook->jupyter) downloading backports_abc-0.4-py2.py3-none-any.whl collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) downloading wcwidth-0.1.7-py2.py3-none-any.whl collecting functools32; python_version == "2.7" (from jsonschema!=2.5.0,>=2.0->nbformat->nbconvert->jupyter) downloading functools32-3.2.3-2.zip building wheels collected packages: terminado, tornado, configparser, backports.ssl-match-hostname, functools32 running setup.py bdist_wheel terminado ... done stored in directory: /root/.cache/pip/wheels/3b/c2/ea/af635ffb63857a8c2ddd22da6a4b52f5b7ea3065db94ef5d7c running setup.py bdist_wheel tornado ... done stored in directory: /root/.cache/pip/wheels/b3/db/47/46e05d1ee3ecfba252fcab42f0a156dab0df0cddf99fa0827c running setup.py bdist_wheel configparser ... done stored in directory: /root/.cache/pip/wheels/1c/bd/b4/277af3f6c40645661b4cd1c21df26aca0f2e1e9714a1d4cda8 running setup.py bdist_wheel backports.ssl-match-hostname ... done stored in directory: /root/.cache/pip/wheels/5d/72/36/b2a31507b613967b728edc33378a5ff2ada0f62855b93c5ae1 running setup.py bdist_wheel functools32 ... done stored in directory: /root/.cache/pip/wheels/3c/d0/09/cd78d0ff4d6cfecfbd730782a7815a4571cd2cd4d2ed6e69d9 built terminado tornado configparser backports.ssl-match-hostname functools32 installing collected packages: configparser, entrypoints, enum34, ipython-genutils, traitlets, functools32, jsonschema, jupyter-core, nbformat, pygments, mistune, nbconvert, ptyprocess, backports.ssl-match-hostname, singledispatch, certifi, backports-abc, tornado, terminado, jupyter-client, pathlib2, pickleshare, backports.shutil-get-terminal-size, wcwidth, prompt-toolkit, ipython, ipykernel, notebook, widgetsnbextension, ipywidgets, qtconsole, jupyter-console, jupyter found existing installation: tornado 3.1.1 deprecation: uninstalling distutils installed project (tornado) has been deprecated , removed in future version. due fact uninstalling distutils project partially uninstall project. uninstalling tornado-3.1.1: uninstalled tornado-3.1.1 found existing installation: ipython 1.2.1 deprecation: uninstalling distutils installed project (ipython) has been deprecated , removed in future version. due fact uninstalling distutils project partially uninstall project. uninstalling ipython-1.2.1: uninstalled ipython-1.2.1 rolling uninstall of ipython exception: traceback (most recent call last): file "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) file "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, file "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install **kwargs file "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) file "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, file "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 377, in move_wheel_files clobber(source, dest, false, fixer=fixer, filter=filter) file "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 323, in clobber shutil.copyfile(srcfile, destfile) file "/usr/lib/python2.7/shutil.py", line 83, in copyfile open(dst, 'wb') fdst: ioerror: [errno 20] not directory: '/usr/local/share/man/man1/ipython.1.gz' /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: insecureplatformwarning: true sslcontext object not available. prevents urllib3 configuring ssl appropriately , may cause ssl connections fail. can upgrade newer version of python solve this. more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. insecureplatformwarning mona@pascal:~/computer_vision/imgur$ jupyter notebook jupyter: 'notebook' not jupyter command mona@pascal:~/computer_vision/imgur$ jupyter usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [subcommand] jupyter: error: 1 of arguments --version subcommand --config-dir --data-dir --runtime-dir --paths required mona@pascal:~/computer_vision/imgur$
starting in ubuntu 17.04 jupyter notebook can installed directly default ubuntu repositories (sudo apt install jupyter-notebook jupyter-core python-ipykernel
). python-ipykernel necessary running python 2.x programs in jupyter notebook, otherwise supports python 3.x.
the following instructions installing jupyter notebook in ubuntu 14.04→16.10. default version of python in ubuntu works ok, pip needs updated latest version, , when installing pip set home environment variable home directory specified target user's password database entry, using option -h
.
install jupyter in ubuntu 14.04→16.10
sudo apt-get update sudo apt-get -y install python-pip python-dev sudo -h pip install --upgrade pip sudo apt-get -y install ipython ipython-notebook sudo -h pip install jupyter
to start jupyter notebook, run following command:
jupyter notebook
if have python-matplotlib installed, first line of code enable plotting in current notebook %matplotlib inline
it possible use python 3 in jupyter notebook python 2 adding kernel python 2. if you're running jupyter on python 3, can set python 2 kernel this:
python2 -m pip install ipykernel python2 -m ipykernel install --user
Comments
Post a Comment