[英]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. 我正在尝试安装
jupyter notebook
但是由于某些原因,我无法安装它。 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
. 我猜这里的问题是
pip
的安装。 When I check the version of pip
I get the following result : 当我检查
pip
的版本时,我得到以下结果:
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 : 但是,当我尝试升级
pip
版本时,出现此错误:
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 : 其中
NITS
是用户名abcde
是密码, proxy server = 172.16.30.20
和password=8080
,此后出现以下错误:
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
. 但是这都不适用于使用
pip
安装jupyter notebook
。
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?? 谁能帮忙吗?
For Ubuntu 14.04 对于Ubuntu 14.04
I solved the problem of installation using anaconda
. 我解决了使用
anaconda
进行安装的问题。 The description is given in this link.I couldn't fix the problem of upgrading pip
. 该说明中给出这个 link.I无法修复升级的问题
pip
。 The steps for installing jupyter notebook
is given below : 下面给出了安装
jupyter notebook
的步骤:
Step 1 (refer here ) 第1步 (请参阅此处 )
First we install anaconda
using wget
首先我们使用
wget
安装anaconda
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86.sh
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86.sh
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
Step 2 第2步
After the download is over : 下载结束后:
32 bits version 32位版本
bash Anaconda-2.3.0-Linux-x86.sh bash Anaconda-2.3.0-Linux-x86.sh
64 bits version 64位版本
bash Anaconda-2.3.0-Linux-x86_64.sh bash Anaconda-2.3.0-Linux-x86_64.sh
After downloading anaconda
, open your terminal
and type the following command : 下载
anaconda
,打开您的terminal
并输入以下命令:
$ 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. 打开一个新
terminal
然后转到下载anaconda
的目录。
$ cd anaconda2/bin
~/anaconda2/bin$ source activate
(root):~/anaconda2/bin$ jupyter notebook
The jupyter notebook
will be opened in the browser. jupyter notebook
将在浏览器中打开。
For more information on jupyter notebook
you can refer to this link . 有关
jupyter notebook
更多信息,请参考此链接 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.