pip 与 pip3 区别

  • 电脑同时有多个版本的 python 时,pip3 可以自动判别用 python3 来安装库,是为了避免同 python2 发生冲突。
  • 如果你的电脑仅仅安装了 python3,使用 pip 或者 pip3 是一样的。

pip install xxxxxx
新安装的库会放在这个目录下面:python2.7/site-packages

pip3 install xxxxxx
新安装的库会放在这个目录下面:python3.6/site-packages

如果使用 python3 执行程序,那么就不能 import python2.7/site-packages 中的库。

pip3 always operates on the Python3 environment only, as pip2 does with Python2. pip operates on whichever environment is appropriate to the context. For example if you are in a Python3 venv, pip will operate on the Python3 environment.

appropriate [əˈprəʊpriət , əˈprəʊprieɪt]:adj. 合适的,恰当的 v. 盗用,挪用,占用,侵吞,拨 (专款等)
strong@foreverstrong:~$ which pip
/usr/local/bin/pip
strong@foreverstrong:~$
strong@foreverstrong:~$ which pip3
strong@foreverstrong:~$
strong@foreverstrong:~$ which python
/usr/bin/python
strong@foreverstrong:~$
strong@foreverstrong:~$ which python3
/usr/bin/python3
strong@foreverstrong:~$
strong@foreverstrong:~$ pip -V
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.warnings.warn(warning, RequestsDependencyWarning)
pip 18.0 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
strong@foreverstrong:~$
strong@foreverstrong:~$ pip3 -V
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip
strong@foreverstrong:~$
strong@foreverstrong:~$ pip list
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.warnings.warn(warning, RequestsDependencyWarning)
Package                            Version
---------------------------------- -----------
adium-theme-ubuntu                 0.3.4
attrs                              15.2.0
autobahn                           0.10.3
backports-abc                      0.5
backports.functools-lru-cache      1.4
backports.shutil-get-terminal-size 1.0.0
backports.weakref                  1.0rc1
bleach                             1.5.0
colour                             0.1.5
configparser                       3.5.0
cryptography                       1.2.3
cycler                             0.10.0
Cython                             0.28.2
decorator                          4.1.2
descartes                          1.1.0
entrypoints                        0.2.3
enum34                             1.1.6
funcsigs                           1.0.2
functools32                        3.2.3.post2
futures                            3.0.5
goto                               1.0
heatmap                            2.2.1
hmmlearn                           0.2.0
html5lib                           0.9999999
idna                               2.0
imutils                            0.4.6
ipaddress                          1.0.16
ipykernel                          4.8.2
ipython                            5.7.0
ipython-genutils                   0.2.0
ipywidgets                         7.2.1
Jinja2                             2.10
joblib                             0.9.4
jsonschema                         2.6.0
jupyter                            1.0.0
jupyter-client                     5.2.3
jupyter-console                    5.2.0
jupyter-core                       4.4.0
lxml                               4.2.3
lz4                                0.7.0
Markdown                           2.6.9
MarkupSafe                         1.0
matplotlib                         2.1.1
meld                               3.14.2
mistune                            0.8.3
mock                               2.0.0
mpi4py                             1.3.1
msgpack-python                     0.4.6
mvnc                               1.11.0.2
nbconvert                          5.3.1
nbformat                           4.4.0
networkx                           2.0
nose                               1.3.7
notebook                           5.5.0
numpy                              1.13.3
olefile                            0.44
PAM                                0.4.2
pandocfilters                      1.4.2
pathlib2                           2.3.2
pbr                                3.1.1
pexpect                            4.6.0
pickleshare                        0.7.4
Pillow                             4.3.0
pip                                18.0
poster                             0.8.1
prompt-toolkit                     1.0.15
protobuf                           3.4.0
psutil                             5.4.0
ptyprocess                         0.5.2
pyasn1                             0.1.9
pyasn1-modules                     0.0.7
Pygments                           2.2.0
pygobject                          3.20.0
pyOpenSSL                          0.15.1
pyparsing                          2.2.0
pyserial                           3.0.1
Pyste                              0.9.10
python-dateutil                    2.6.1
python-snappy                      0.5
pytz                               2017.3
PyWavelets                         0.5.2
pyzmq                              17.0.0
qtconsole                          4.3.1
scandir                            1.7
scikit-image                       0.13.1
scikit-learn                       0.19.1
scipy                              1.0.0
Send2Trash                         1.5.0
service-identity                   16.0.0
setuptools                         36.6.0
Shapely                            1.6.4.post1
simplegeneric                      0.8.1
simplejson                         3.8.1
singledispatch                     3.4.0.3
six                                1.11.0
subprocess32                       3.2.7
tensorflow-gpu                     1.3.0
tensorflow-tensorboard             0.1.8
terminado                          0.8.1
testpath                           0.3.1
tornado                            5.0.2
traitlets                          4.3.2
trollius                           2.0.1
Twisted                            16.0.0
txaio                              1.0.0
unity-lens-photos                  1.0
virtualenv                         15.1.0
wcwidth                            0.1.7
Werkzeug                           0.12.2
wheel                              0.30.0
widgetsnbextension                 3.2.1
zope.interface                     4.1.3
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
strong@foreverstrong:~$
strong@foreverstrong:~$ pip show hmmlearn
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.warnings.warn(warning, RequestsDependencyWarning)
Name: hmmlearn
Version: 0.2.0
Summary: Hidden Markov Models in Python with scikit-learn like API
Home-page: https://github.com/hmmlearn/hmmlearn
Author: Sergei Lebedev
Author-email: superbobry@gmail.com
License: new BSD
Location: /home/strong/.local/lib/python2.7/site-packages
Requires:
Required-by:
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
strong@foreverstrong:~$
strong@foreverstrong:~$ pip3 list
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip
strong@foreverstrong:~$

pip 与 pip3 区别相关推荐

  1. pip 和pip3区别

    python 有python2和python3的区别 那么pip也有pip和pip3的区别 大概是这样的 1.pip是python的包管理工具,pip和pip3版本不同,都位于Scripts\目录下: ...

  2. ubuntu python3.7修改默认pip版本_详解Ubuntu16.04安装Python3.7及其pip3并切换为默认版本 安装python3后使用pip和pip3的区别...

    Python3.4已经默认安装了pip为什么执行不了我的谁说过,念念不忘就该放.但我也记得你说过,爱一个人不是一天两天的事. 如何升级到python3版本并且安装pip3 确保你的系统上已经安装好了 ...

  3. python pip全称_python中pip与pip3 的区别

    python中pip与pip3 的区别 一.总结 一句话总结: 1.pip是python的包管理工具,pip和pip3版本不同,都位于Scripts\目录下: 2.如果系统中只安装了Python2,那 ...

  4. python中pip和pip3的区别、使用以及加速方法

    1. pip与pip3的区别 pip 是 Python 的包安装程序.其实,pip 就是 Python 标准库(The Python Standard Library)中的一个包,只是这个包比较特殊, ...

  5. pip、pip2和pip3区别

    1.功能 pip 是 Python 包管理工具,该工具提供了对Python 包的查找.下载.安装.卸载的功能. 2.pip.pip2和pip3区别 (1)pip和pip2相同,均对应Python2.x ...

  6. Python中pip,pip3,虚拟环境(venv)三者的关系,如何在pycharm中使用虚拟环境,以及安装依赖包所遇到的问题。

    目录 一.是什么是pip,pip3,与虚拟环境(venv) 二.三者之间的联系 三.在pycharm中设置虚拟环境 四.安装python依赖包的快捷方式 五.注意事项 六.感谢观看!!!点个赞或者关注 ...

  7. python pip与pip3安装、更新、卸载、查看等常用命令汇总

    Python和 pycharm的使用 1. pycharm和Python 下载 安装后需要激活码.判断Python是否安装好了,cmd下跑: python --version 2. 配置环python ...

  8. 升级pip 升级pip3的快速方法

    1.修改python镜像地址 我们这里使用的是华为的镜像地址,我挨个测试过了,在学校的网络下使用华为的镜像地址速度会稍微快一些.具体为啥,请咨询学校网管. 2.pip升级或pip3升级 注:-U就是 ...

  9. pip或pip3安装报错Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming。。。

    Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate ...

最新文章

  1. vue-router获取url传参
  2. 43 | 发挥人的潜能:探索式测试
  3. Ajax缓存解决办法
  4. C#实现对指定文件夹中文件按修改时间排序
  5. ssl certificate 验证
  6. [Leedcode][JAVA][第999题][直接考虑题意]
  7. 一步一步写STL:空间配置器(1)
  8. Java中常见的异常有哪些?
  9. 决策树cart算法详解
  10. w ndows7旗舰版网卡驱动,windows7万能网卡驱动官方下载
  11. C++互斥量、原子锁、自旋锁等比较
  12. 录像机中码流类型中定时、事件、网传代表什么意思?
  13. opencv 手选roi区域_【OpenCV】选择ROI区域
  14. 病毒不断变异,我们如何防护?
  15. 已知差异脑区MNI坐标,如何将MNI坐标转化为AAL分区和布罗得曼分区Brodmann area名称
  16. 【积跬步以至千里】App Crashed - WriteMiniDump
  17. 阿里云轻量应用服务器环境搭建-Docker安装tomcat
  18. OSPF虚电路去区域路由过滤
  19. 如何解决pjreddie版darknet不能使用cudnn8编译的问题
  20. SpeedFan 4.20

热门文章

  1. galera for mysql_Galera Cluster for MySQL
  2. 05. 聚类---K(k-means)均值
  3. 原来华为云账号,竟有这些你不知道的“猫腻”?
  4. oracle验证pfile起库,Oracle数据库数据恢复验证笔记
  5. 定点数和浮点数的表示
  6. ARC107 B - Quadruple(差分)
  7. 编译报错:实际参数列表和形式参数列表长度不同 解决方法
  8. 小米偷师乔布斯:国产手机最成功的事件营销
  9. 如何让一个程序开机自启
  10. PostgreSQL数据库系列之五:预写式日志WAL