<tfoot id='G3kZq'></tfoot>

          <bdo id='G3kZq'></bdo><ul id='G3kZq'></ul>

      1. <small id='G3kZq'></small><noframes id='G3kZq'>

      2. <i id='G3kZq'><tr id='G3kZq'><dt id='G3kZq'><q id='G3kZq'><span id='G3kZq'><b id='G3kZq'><form id='G3kZq'><ins id='G3kZq'></ins><ul id='G3kZq'></ul><sub id='G3kZq'></sub></form><legend id='G3kZq'></legend><bdo id='G3kZq'><pre id='G3kZq'><center id='G3kZq'></center></pre></bdo></b><th id='G3kZq'></th></span></q></dt></tr></i><div id='G3kZq'><tfoot id='G3kZq'></tfoot><dl id='G3kZq'><fieldset id='G3kZq'></fieldset></dl></div>
      3. <legend id='G3kZq'><style id='G3kZq'><dir id='G3kZq'><q id='G3kZq'></q></dir></style></legend>

        pip 或 pip3 为 Python 3 安装包?

        pip or pip3 to install packages for Python 3?(pip 或 pip3 为 Python 3 安装包?)
        <tfoot id='JupJD'></tfoot>

              <legend id='JupJD'><style id='JupJD'><dir id='JupJD'><q id='JupJD'></q></dir></style></legend>
            1. <i id='JupJD'><tr id='JupJD'><dt id='JupJD'><q id='JupJD'><span id='JupJD'><b id='JupJD'><form id='JupJD'><ins id='JupJD'></ins><ul id='JupJD'></ul><sub id='JupJD'></sub></form><legend id='JupJD'></legend><bdo id='JupJD'><pre id='JupJD'><center id='JupJD'></center></pre></bdo></b><th id='JupJD'></th></span></q></dt></tr></i><div id='JupJD'><tfoot id='JupJD'></tfoot><dl id='JupJD'><fieldset id='JupJD'></fieldset></dl></div>

              <small id='JupJD'></small><noframes id='JupJD'>

              • <bdo id='JupJD'></bdo><ul id='JupJD'></ul>

                  <tbody id='JupJD'></tbody>
                  本文介绍了pip 或 pip3 为 Python 3 安装包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一台装有 OS X El Captain 的 Macbook.我认为 Python 2.7 是预装的.但是,我也安装了 Python 3.5.当我开始使用 Python 3 时,我读到如果我想安装一个包,我应该输入:

                  I have a Macbook with OS X El Captain. I think that Python 2.7 comes preinstalled on it. However, I installed Python 3.5 too. When I started using Python 3, I read that if I want to install a package, I should type:

                  pip3 install some_package
                  

                  不管怎样,现在当我使用

                  Anyway, now when I use

                  pip install some_package
                  

                  我为 Python 3 安装了 some_package.我的意思是我可以导入它并毫无问题地使用它.此外,当我在 Terminal 中仅键入 pip3 时,我收到了有关用法的消息:

                  I get some_package installed for Python 3. I mean I can import it and use it without problems. Moreover, when I type just pip3 in Terminal, I got this message about the usage:

                  Usage:   
                    pip <command> [options]
                  

                  这与我输入 pip 时得到的消息相同.

                  which is the same message I get when I type just pip.

                  这是否意味着在以前的版本中,情况有所不同,现在 pippip3 可以互换使用?如果是这样,并且为了争论,我如何为 Python 2 而不是 Python 3 安装包?

                  Does it mean that in previos versions, things were different, and now pip and pip3 can be used interchangeably? If so, and for the sake of argument, how can I install packages for Python 2 instead of Python 3?

                  推荐答案

                  您的 pip 是与 pip3 相同的可执行文件路径的软链接.您可以使用以下命令检查您的 pippip3 实际路径在哪里:

                  Your pip is a soft link to the same executable file path with pip3. you can use the commands below to check where your pip and pip3 real paths are:

                  $ ls -l `which pip`
                  $ ls -l `which pip3`
                  

                  您也可以使用以下命令了解更多详情:

                  You may also use the commands below to know more details:

                  $ pip show pip
                  $ pip3 show pip
                  

                  当我们安装不同版本的python时,我们可能会创建这样的软链接到

                  When we install different versions of python, we may create such soft links to

                  • 将默认点设置为某个版本.
                  • 为不同的版本制作不同的链接.

                  pythonpython2python3

                  如果您对它在不同情况下的发生方式感兴趣,请在下面了解更多信息:

                  More information below if you're interested in how it happens in different cases:

                  • MacOS/Homebrew
                  • Fedora/CentOS
                  • Debian/Ubuntu

                  这篇关于pip 或 pip3 为 Python 3 安装包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Split a Pandas column of lists into multiple columns(将 Pandas 的列表列拆分为多列)
                  How does the @property decorator work in Python?(@property 装饰器在 Python 中是如何工作的?)
                  What is the difference between old style and new style classes in Python?(Python中的旧样式类和新样式类有什么区别?)
                  How to break out of multiple loops?(如何打破多个循环?)
                  How to put the legend out of the plot(如何将传说从情节中剔除)
                  Why is the output of my function printing out quot;Nonequot;?(为什么我的函数输出打印出“无?)

                    • <i id='b8U5U'><tr id='b8U5U'><dt id='b8U5U'><q id='b8U5U'><span id='b8U5U'><b id='b8U5U'><form id='b8U5U'><ins id='b8U5U'></ins><ul id='b8U5U'></ul><sub id='b8U5U'></sub></form><legend id='b8U5U'></legend><bdo id='b8U5U'><pre id='b8U5U'><center id='b8U5U'></center></pre></bdo></b><th id='b8U5U'></th></span></q></dt></tr></i><div id='b8U5U'><tfoot id='b8U5U'></tfoot><dl id='b8U5U'><fieldset id='b8U5U'></fieldset></dl></div>
                        <bdo id='b8U5U'></bdo><ul id='b8U5U'></ul>

                      • <tfoot id='b8U5U'></tfoot>
                          <tbody id='b8U5U'></tbody>
                        <legend id='b8U5U'><style id='b8U5U'><dir id='b8U5U'><q id='b8U5U'></q></dir></style></legend>

                      • <small id='b8U5U'></small><noframes id='b8U5U'>