python curl_get-pip.py Installing with get-pip.py
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的更多相关文章
- [python] Ubuntu 环境下安装 python3.5 + pip
一般情况下先添加PPA,但是我添加PPA会报错: sudo add-apt-repository ppa:fkrull/deadsnakes ubuntu add-apt-repository: co ...
- Python之No module named setuptools 安装pip
早上运行程序的时候发现没有引入相应的module,然后使用pip去安装的时候发现自己没有在安装pip,于是在自己的软件群里边找见了pip安装包,在pip的解压目录下运行python setup.py ...
- 【转】python多版本并存,python3安装pip
python3 与 pip3 安装与使用 1. yum -y install openssl* (pip依赖ssl环境) 2.编译安装python3 下载地址:https://www.python ...
- Python的包管理工具easy_install, setuptools, pip,distribute介绍
1.相互之间的关联 easy_install, setuptools, pip,distribute,这几个工具的联系,如下图: 可以看到distribute是setuptools的取代,pip是ea ...
- 解决安装虚拟环境出现的问题(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 ...
- py安装以及配置pip环境变量
安装python,安装包链接:https://pan.baidu.com/s/1u4tA-FJMxtrtJTap-zFh3g 密码:gh1c 默然安装到了C盘 安装pycharm:安装包链接:链接:h ...
- Python项目生成requirements.txt文件及pip升级问题解决及流程
缘由:新项目使用Python, PC上的python包不全,需要通过requirements.txt文件指定安装所需包 pip安装遇到一些坑 一.直接使用pip包管理工具生成requirements. ...
- pip Read timed out 和 pip 源
解决方法,设置超时时间 pip --default-timeout=100 install -U Pillow 安装时指定源(--index-url) #例如安装scipy时使用豆瓣的源 pip in ...
- 【转】python:让源码更安全之将py编译成so
python:让源码更安全之将py编译成so 应用场景 Python是一种面向对象的解释型计算机程序设计语言,具有丰富和强大的库,使用其开发产品快速高效. python的解释特性是将py编译为独有的二 ...
随机推荐
- C++ cin相关函数总结
输入原理: 程序的输入都建有一个缓冲区,即输入缓冲区.一次输入过程是这样的,当一次键盘输入结束时会将输入的数据存入输入缓冲区,而cin函数直接从输入缓冲区中取数据.正因为cin函数是直接从缓冲区取数据 ...
- [LeetCode] 116. 填充每个节点的下一个右侧节点指针
题目链接 : https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/ 题目描述: 给定一个完美二叉树 ...
- 【学习总结】快速上手Linux玩转典型应用-第7章-WebServer安装和配置讲解
课程目录链接 快速上手Linux玩转典型应用-目录 目录 1. Apache的安装 2. Apache的虚拟主机配置及伪静态操作 3. Nginx的基本操作 4. Nginx伪静态的实现 5. 实例演 ...
- 利用webSocket实现浏览器中多个标签页之间的通信
webSoket用来实现双向通信,客户端和服务端实时通信. webSoket优点和缺点? 优点:对于前端来说,使用简单,功能灵活,如果部署了webSocket服务器,可以实现实时通信. 缺点:需要服务 ...
- php 爬虫爱奇艺 视频、内容
,][]; ][]; ][]); ][]); ]); ][]; ][]; ][])) { ][]; }][])) { ][]; } ][]; ; ...
- linux NFS 实例
为了证明是 Allentunsgroup 组起的作用而非用户 [root@NFS_Client ~]# useradd scott1 [root@NFS_Client ~]# passwd scott ...
- Codeforces Round #427 (Div. 2) - C
题目链接:http://codeforces.com/contest/835/problem/C 题意:在二维坐标里,有n个星星,m个询问,星星的最大亮度c.然后输入n个星星的坐标和初始亮度,对于每个 ...
- BZOJ 2560: 串珠子 (状压DP+枚举子集补集+容斥)
(Noip提高组及以下),有意者请联系Lydsy2012@163.com,仅限教师及家长用户. 2560: 串珠子 Time Limit: 10 Sec Memory Limit: 128 MB Su ...
- 北京师范大学第十五届ACM决赛-重现赛D Disdain Chain (规律+组合数学)
链接:https://ac.nowcoder.com/acm/contest/3/D 来源:牛客网 Disdain Chain 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 2621 ...
- Codeforces 913 二进制背包(柠檬水) 暴力贪心特殊背包(选题)
A B C 给你N(N<=30)种水瓶每种水瓶有无限个 每个的体积是2^(i-1)价格是cost[i] 要求你花最少的钱弄出L体积的水 先从前到后扫一遍cost[i+1]=min(cost[i+ ...