江苏省建设厅网站施工员证查询,phpcms网站logo,做网站用什么配置的vps,猎聘网网站谁做的Python3 pip
pip 是 Python 包管理工具#xff0c;该工具提供了对 Python 包的查找、下载、安装、卸载的功能。
软件包也可以在 https://pypi.org/ 中找到。
目前最新的 Python 版本已经预装了 pip。
注意#xff1a;Python 2.7.9 或 Python 3.4 以上版本都自带 pip 工具…Python3 pip
pip 是 Python 包管理工具该工具提供了对 Python 包的查找、下载、安装、卸载的功能。
软件包也可以在 https://pypi.org/ 中找到。
目前最新的 Python 版本已经预装了 pip。
注意Python 2.7.9 或 Python 3.4 以上版本都自带 pip 工具。
pip3安装
方法一先安装python3python3安装好后pip3默认安装 官网
方法二手动下载安装指定版本
# 下载指定版本
wget https://pypi.python.org/packages/source/p/pip/pip-18.1.tar.gz
# 解压
tar -zxvf pip-18.1.tar.gz
# 安装
cd pip-18.1
python3 setup.py build
python3 setup.py install
# 添加到软连接
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
# 查看软连接
ll /usr/bin/pip*debian系列安装 apt-get install -y pip (python2.x就去安装pip2)apt-get install -y pip-python3 (python3.x就去安装pip3)RHEL系列安装 wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gztar -zvxf 9.0.1.tar.gz -C pip-9.0.1 # 解压文件cd pip-9.0.1python3 setup.py installpip install --upgrade pip #升级pip(可选)也就是说此方法都是二进制源代码但是我都去装了都显示正确的信息如1。但是无论是pip,还是pip3还是pip -V,或者pip3 -V。都没反应如同没装。不知道为何记录一下以后再试 为什么想要去用二进制装呢因为我在制作docker的images而apt install需要先apt update这样images会立刻增加200M。所以为了缩减就想用二进制装一些必要的 现在有一个想法是否需要建立软连接ln s 就如同二进制安装python时需要建立软连接。(20181019)
找到原因了需要添加到环境里第一种我有试了下和之前返回成功信息一样但这次信息里多了一些我把默认改为python3.x
root853e19c0f418:/# python -V
Python 3.7.1rc2
root853e19c0f418:/# python3 -V
Python 3.7.1rc2root3547dc8d3d33:/# python get-pip.py
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pipDownloading https://pypi.tuna.tsinghua.edu.cn/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)100% |████████████████████████████████| 1.3MB 1.9MB/s
Collecting wheelDownloading https://pypi.tuna.tsinghua.edu.cn/packages/fc/e9/05316a1eec70c2bfc1c823a259546475bd7636ba6d27ec80575da523bc34/wheel-0.32.1-py2.py3-none-any.whl
Installing collected packages: pip, wheelFound existing installation: pip 10.0.1Uninstalling pip-10.0.1:Successfully uninstalled pip-10.0.1The script wheel is installed in /usr/python/bin which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-18.1 wheel-0.32.1
root3547dc8d3d33:/# pip
bash: pip: command not found
root3547dc8d3d33:/# pip3
bash: pip3: command not found
root3547dc8d3d33:/# pip list
bash: pip: command not found卸载PIP
python3 -m pip uninstall pip注如果安装了多个版本的pip可执行多次卸载 重装PIP的命令easy_inatall pip
升级PIP
# 已验证
pip3 install --upgrade pip
# 未验证
python -m pip install --upgrade pip注默认是升级到最新版本
pip版本降级
python -m pip install pip9.0.3重装PIP的命令
easy_inatall pippip和pip3有什么区别
如果同时装有python2和python3 pip默认给python2用。 pip3指定给python3用。