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. 洛谷 P1541 乌龟棋 & [NOIP2010提高组](dp)

    传送门 解题思路 一道裸的dp. 用dp[i][j][k][kk]表示用i个1步,j个2步,k个3步,kk个4步所获得的最大价值,然后状态转移方程就要分情况讨论了(详见代码) 然后就是一开始统计一下几 ...

  2. 列表and元组操作

    一.列表  列表是我们以后比较常用的数据类型之一,通过列表我们可以实现对数据的存储.修改等操作. 首先,我们看一下列表的定义: 有了列表以后,我们可以通过下标来访问列表中的元素.注意:下表是从0开始的 ...

  3. vmware下使用nat方法联网

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/Li_Zefeng/article/det ...

  4. SharePoint自己定义程序页面部署 不用重新启动IIS

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/dz45693/article/details/30840255 SharePoint的部署方式默认是 ...

  5. JSP中九大内置对象及其作用

    jsp中有九大内置对象分别为:request,response,session,application,out,pageContext,page,config,exception. request:请 ...

  6. 出去就餐并且理解Express.js的基本知识

    Going out to eat and understanding the basics of Express.js出去就餐并且理解Express.js的基本知识 原文:Going out to e ...

  7. bash_profile和bashrc区别

    [.bash_profile 与 .bashrc 的区别].bash_profile is executed for login shells, while .bashrc is executed f ...

  8. docker持久化之存储卷

         启动时敲:   docker run -it -v /var/mydata:/abc myos   #前面写真实机里的文件夹,冒号后面写docker里面的文件夹,最后写镜像名 (可以同时挂载 ...

  9. libevent cs

    int evutil_make_listen_socket_reuseable(evutil_socket_t sock): 相当于执行以下操作 int one = 1; setsockopt(soc ...

  10. SpringBoot2 Filter执行两次问题解决

    原因:在请求指定url之外还请求了/favicon.ico 地址 过滤掉问题就解决了 @Overridepublic void doFilter(ServletRequest request, Ser ...