w

curl https://bootstrap.pypa.io/get-pip.py > curl_get-pip.py
python curl_get-pip.py

https://pip.pypa.io/en/stable/installing/

curl https://bootstrap.pypa.io/get-pip.py > curl_get-pip.py

wuser@ubuntu:~$ pip install -U pip setuptools
The program 'pip' is currently not installed. You can install it by typing:
sudo apt install python-pip
wuser@ubuntu:~$ python get-pip.py
python: can't open file 'get-pip.py': [Errno 2] No such file or directory
wuser@ubuntu:~$ python https://bootstrap.pypa.io/get-pip.py
python: can't open file 'https://bootstrap.pypa.io/get-pip.py': [Errno 2] No such file or directory
wuser@ubuntu:~$ pwd
/home/wuser
wuser@ubuntu:~$ ll
total
drwxr-xr-x wuser wuser May : ./
drwxr-xr-x root root May : ../
-rw-r--r-- wuser wuser May : .bash_logout
-rw-r--r-- wuser wuser May : .bashrc
drwx------ wuser wuser May : .cache/
-rw-rw-r-- wuser wuser May : .dbshell
-rw------- wuser wuser May : .mongorc.js
-rw-r--r-- wuser wuser May : .profile
-rw-r--r-- wuser wuser May : .sudo_as_admin_successful
wuser@ubuntu:~$ curl https://bootstrap.pypa.io/get-pip.py > curl_get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
1558k 1558k 196k :: :: --:--:-- 331k
wuser@ubuntu:~$ ls
curl_get-pip.py
wuser@ubuntu:~$ python curl_get-pip.py
Collecting pip
Downloading pip-9.0.-py2.py3-none-any.whl (.3MB)
% |████████████████████████████████| .3MB 18kB/s
Collecting setuptools
Downloading setuptools-35.0.-py2.py3-none-any.whl (390kB)
% |████████████████████████████████| 399kB 59kB/s
Collecting wheel
Downloading wheel-0.29.-py2.py3-none-any.whl (66kB)
% |████████████████████████████████| 71kB 22kB/s
Collecting appdirs>=1.4. (from setuptools)
Downloading appdirs-1.4.-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools)
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting six>=1.6. (from setuptools)
Downloading six-1.10.-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools)
Downloading pyparsing-2.2.-py2.py3-none-any.whl (56kB)
% |████████████████████████████████| 61kB 72kB/s
Installing collected packages: pip, appdirs, pyparsing, six, packaging, setuptools, wheel
Exception:
Traceback (most recent call last):
File "/tmp/tmpO7xHXx/pip.zip/pip/basecommand.py", line , in main
status = self.run(options, args)
File "/tmp/tmpO7xHXx/pip.zip/pip/commands/install.py", line , in run
prefix=options.prefix_path,
File "/tmp/tmpO7xHXx/pip.zip/pip/req/req_set.py", line , in install
**kwargs
File "/tmp/tmpO7xHXx/pip.zip/pip/req/req_install.py", line , in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/tmp/tmpO7xHXx/pip.zip/pip/req/req_install.py", line , in move_wheel_files
isolated=self.isolated,
File "/tmp/tmpO7xHXx/pip.zip/pip/wheel.py", line , in move_wheel_files
clobber(source, lib_dir, True)
File "/tmp/tmpO7xHXx/pip.zip/pip/wheel.py", line , in clobber
ensure_dir(destdir)
File "/tmp/tmpO7xHXx/pip.zip/pip/utils/__init__.py", line , in ensure_dir
os.makedirs(path)
File "/usr/lib/python2.7/os.py", line , in makedirs
mkdir(name, mode)
OSError: [Errno ] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip'
wuser@ubuntu:~$ sudo python curl_get-pip.py
The directory '/home/wuser/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/wuser/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading pip-9.0.-py2.py3-none-any.whl (.3MB)
% |████████████████████████████████| .3MB 18kB/s
Collecting setuptools
Downloading setuptools-35.0.-py2.py3-none-any.whl (390kB)
% |████████████████████████████████| 399kB 17kB/s
Collecting wheel
Downloading wheel-0.29.-py2.py3-none-any.whl (66kB)
% |████████████████████████████████| 71kB 10kB/s
Collecting appdirs>=1.4. (from setuptools)
Downloading appdirs-1.4.-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools)
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting six>=1.6. (from setuptools)
Downloading six-1.10.-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools)
Downloading pyparsing-2.2.-py2.py3-none-any.whl (56kB)
% |████████████████████████████████| 61kB 17kB/s
Installing collected packages: pip, appdirs, pyparsing, six, packaging, setuptools, wheel
Successfully installed appdirs-1.4. packaging-16.8 pip-9.0. pyparsing-2.2. setuptools-35.0. six-1.10. wheel-0.29.
wuser@ubuntu:~$

python curl_get-pip.py Installing with get-pip.py的更多相关文章

  1. [python] Ubuntu 环境下安装 python3.5 + pip

    一般情况下先添加PPA,但是我添加PPA会报错: sudo add-apt-repository ppa:fkrull/deadsnakes ubuntu add-apt-repository: co ...

  2. Python之No module named setuptools 安装pip

    早上运行程序的时候发现没有引入相应的module,然后使用pip去安装的时候发现自己没有在安装pip,于是在自己的软件群里边找见了pip安装包,在pip的解压目录下运行python setup.py ...

  3. 【转】python多版本并存,python3安装pip

    python3 与 pip3 安装与使用   1. yum -y install openssl* (pip依赖ssl环境) 2.编译安装python3 下载地址:https://www.python ...

  4. Python的包管理工具easy_install, setuptools, pip,distribute介绍

    1.相互之间的关联 easy_install, setuptools, pip,distribute,这几个工具的联系,如下图: 可以看到distribute是setuptools的取代,pip是ea ...

  5. 解决安装虚拟环境出现的问题(OSError: Command /home/python/.virtua...ngo3_web/bin/python3 - setuptools pkg_resources pip wheel failed with error code 2)

    python3的报错解决: OSError: Command /home/python/.virtua...ngo3_web/bin/python3 - setuptools pkg_resource ...

  6. py安装以及配置pip环境变量

    安装python,安装包链接:https://pan.baidu.com/s/1u4tA-FJMxtrtJTap-zFh3g 密码:gh1c 默然安装到了C盘 安装pycharm:安装包链接:链接:h ...

  7. Python项目生成requirements.txt文件及pip升级问题解决及流程

    缘由:新项目使用Python, PC上的python包不全,需要通过requirements.txt文件指定安装所需包 pip安装遇到一些坑 一.直接使用pip包管理工具生成requirements. ...

  8. pip Read timed out 和 pip 源

    解决方法,设置超时时间 pip --default-timeout=100 install -U Pillow 安装时指定源(--index-url) #例如安装scipy时使用豆瓣的源 pip in ...

  9. 【转】python:让源码更安全之将py编译成so

    python:让源码更安全之将py编译成so 应用场景 Python是一种面向对象的解释型计算机程序设计语言,具有丰富和强大的库,使用其开发产品快速高效. python的解释特性是将py编译为独有的二 ...

随机推荐

  1. 网络 osi七层协议

    一 互联网的本质 咱们先不说互联网是如何通信的(发送数据,文件等),先用一个经典的例子,给大家说明什么是互联网通信. 现在追溯到八九十年代,当时电话刚刚兴起,还没有手机的概念,只是有线电话,那么此时你 ...

  2. Python 矩阵(线性代数)

    Python 矩阵(线性代数) 这里有一份新手友好的线性代数笔记,是和深度学习花书配套,还被Ian Goodfellow老师翻了牌. 笔记来自巴黎高等师范学院的博士生Hadrien Jean,是针对& ...

  3. hdu 2586 How far away ? ( 离线 LCA , tarjan )

    How far away ? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  4. LeetCode 235. 二叉搜索树的最近公共祖先

    235. 二叉搜索树的最近公共祖先 题目描述 给定一个二叉搜索树, 找到该树中两个指定节点的最近公共祖先. 百度百科中最近公共祖先的定义为:"对于有根树 T 的两个结点 p.q,最近公共祖先 ...

  5. ASP.NET CORE 2.2 MVC 学习

    百度云链接:https://pan.baidu.com/s/1_iSy3wq4Jegr6j_AH9nobA 提取码:n152

  6. 02-Django-views

    # views 视图# 1. 视图概述- 视图即视图函数,接收web请求并返回web响应的事物处理函数.- 响应指符合http协议要求的任何内容,包括json,string, html等 # 2 其他 ...

  7. Spring基础11——Bean的作用域

    1.Bean的作用域种类 Spring中的bean的作用域分为四种:singleton.prototype.session.request,后两种很少使用,下面我们主要来学习前两种 2.singlet ...

  8. VB中preserve的用法

    注:本文转载自:http://zhidao.baidu.com/question/161401549.html ReDim 语句用来定义或重定义原来已经用带空圆括号(没有维数下标)的 Private. ...

  9. JS比较两个时间的时间差

    /** * 比较两个时间的时间差 * @param startTime 开始时间 * @param endTime 结束时间 * @demo compareTime(new Date('2019-12 ...

  10. pandas处理字符串

    # pandas 字符串的处理 # 前面已经学习了字符串的处理函数 # df["bWendu"].str.replace("℃","").a ...