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. [LeetCode] 164. 最大间距

    题目链接 : https://leetcode-cn.com/problems/maximum-gap/ 题目描述: 给定一个无序的数组,找出数组在排序之后,相邻元素之间最大的差值. 如果数组元素个数 ...

  2. django事务模式

    from django.db import transaction from django.db import transaction with transaction.atomic(): obj = ...

  3. html中的dl,dt,dd标签

    html <dl> <dt> <dd>是一组合标签,使用了dt dd最外层就必须使用dl包裹,此组合标签我们也又叫表格标签,与table表格类似组合标签,故名我们也 ...

  4. Spring基础19——Spring中几种注解的区别

    1.@Autowired:注解是用来装配bean的,需要注入的bean必须是已经被IOC容器创建的bean,这个注解是利用类型装配的,如果容器中出现一个以上要装配的类或其子类就需要用@Qualifie ...

  5. Codeforces Round #430 (Div. 2) - D

    题目链接:http://codeforces.com/contest/842/problem/D 题意:定义Mex为一个序列中最小的未出现的正整数,给定一个长度为n的序列,然后有m个询问,每个询问给定 ...

  6. Codeforces Round #430 (Div. 2) - B

    题目链接:http://codeforces.com/contest/842/problem/B 题意:给定一个圆心在原点(0,0)半径为r的大圆和一个圆内的圆环长度d,然后给你n个小圆,问你有多少个 ...

  7. Win10遇到蓝屏错误CRITICAL_STRUCTURE_CORRUPTION如何解决

    很多使用win10系统的用户,都曾经遇到过蓝屏故障.比如,最近有位win10用户在使用电脑时,就发现电脑突然出现了蓝屏,且提示错误CRITICAL_STRUCTURE_CORRUPTION,这是怎么回 ...

  8. Xor Sum 2 AtCoder - 4142 (异或前缀和性质+ 双指针)

    Problem Statement There is an integer sequence A of length N. Find the number of the pairs of intege ...

  9. Python中decode与encode的区别

    摘抄: 字符串在Python内部的表示是Unicode编码,因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符解码(decode)成unicode,再从unicode编码 ...

  10. Ldap 从入门到放弃(一)

    OpenLDAP 2.4版本 快速入门 本文内容是自己通过官网文档.网络和相关书籍学习和理解并整理成文档,其中有错误或者疑问请在文章下方留言. 一.Introduction to OpenLDAP D ...