Pritom Mazumdar
Pritom Mazumdar

Reputation: 335

Installing Jupyter Notebook using pip in Ubuntu 14.04

I am trying to install jupyter notebook but for some reasons I am not able to install it. I have looked into several links like this and this but it did not help me. I am guessing the problem here is with the installation of pip. When I check the version of pip I get the following result :

 shaloin@shaolin-Inspiron-3543:~$ pip --version
 pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)

But when I try to upgrade the version of pip, I am getting this error :

shaloin@shaolin-Inspiron-3543:~$ sudo pip install --upgrade pip
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pip in /usr/lib/python2.7/dist-packages
Downloading/unpacking pip
Cleaning up...
No distributions at all found for pip in /usr/lib/python2.7/dist-packages
Storing debug log for failure in /home/shaloin/.pip/pip.log

So, I searched for the error and I got to know that if you are behind proxy you should try out the following command :

sudo pip --proxy [NITS:abcde@]172.16.30.20:8080 install jupyter

where NITS is the usename abcde is the password , proxy server = 172.16.30.20 and password=8080, after which I got the following error :

Downloading/unpacking jupyter
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in find_requirement
    page = self._get_page(main_index_url, req)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page
    session=self.session,
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 670, in get_page
    resp = session.get(url, headers={"Accept": "text/html"})
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 467, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 455, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py", line 558, in send
    r = adapter.send(request, **kwargs)
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py", line 305, in send
    conn = self.get_connection(request.url, proxies)
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py", line 206, in get_connection
    except_on_missing_scheme(proxy)
  File "/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/utils.py", line 636, in except_on_missing_scheme
    raise MissingSchema('Proxy URLs must have explicit schemes.')
MissingSchema: Proxy URLs must have explicit schemes.

Storing debug log for failure in /home/shaloin/.pip/pip.log

I also tried setting up my proxy in this way :

set http_proxy=http://username:password@proxyAddress:port

set https_proxy=https://username:password@proxyAddress:port

but none of that works for installing jupyter notebook using pip.

Please don't mark this question as duplicate as because I have been searching for the solution for a long time and none of them works.

Can anyone please help??

Upvotes: 0

Views: 1924

Answers (1)

Pritom Mazumdar
Pritom Mazumdar

Reputation: 335

For Ubuntu 14.04

I solved the problem of installation using anaconda. The description is given in this link.I couldn't fix the problem of upgrading pip. The steps for installing jupyter notebook is given below :

Step 1 (refer here)

First we install anaconda using wget

  • 32 bits version

wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86.sh

  • 64 bits version

wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh

Step 2

After the download is over :

  • 32 bits version

    bash Anaconda-2.3.0-Linux-x86.sh

  • 64 bits version

    bash Anaconda-2.3.0-Linux-x86_64.sh

After downloading anaconda, open your terminal and type the following command :

$ sudo gedit ~/.profile

Add the given line at th end of the file :

export PATH=~/anaconda2/bin:$PATH

Step 3

After adding the line save the file. Open a new terminal and go to the directory where anaconda was downloaded.

$ cd anaconda2/bin
~/anaconda2/bin$ source activate
(root):~/anaconda2/bin$ jupyter notebook

The jupyter notebook will be opened in the browser.

For more information on jupyter notebook you can refer to this link.

Upvotes: 2

Related Questions