简体   繁体   English

pip3 安装 Pipenv 警告

[英]pip3 install Pipenv warnings

I ran the following command in my terminal( I am operating on MacOs Catalina):我在终端中运行了以下命令(我在 MacOs Catalina 上运行):

pip3 install pipenv

I received the final log我收到了最终的日志

WARNING: The script virtualenv-clone is installed in '/Users/rubenolmos/Library/Python/3.7/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.
  WARNING: The script virtualenv is installed in '/Users/rubenolmos/Library/Python/3.7/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.
  WARNING: The scripts pipenv and pipenv-resolver are installed in '/Users/rubenolmos/Library/Python/3.7/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 appdirs-1.4.4 certifi-2020.6.20 distlib-0.3.1 filelock-3.0.12 importlib-metadata-1.7.0 pipenv-2020.8.13 virtualenv-20.0.31 virtualenv-clone-0.5.4 zipp-3.1.0

This is my first Mac.这是我的第一台 Mac。 I have a couple of questions: I was not able to run the command using pip, and only was able to use pip3 to run it.我有几个问题:我无法使用 pip 运行命令,只能使用 pip3 来运行它。 Is it bad that I ran it in this format.我以这种格式运行它是不是很糟糕。 when I try to run the command:当我尝试运行命令时:

python3 -m pip3 install pipenv

I get an error that the module pip3 is not recognized, however when I run the following:我收到一个错误,提示无法识别模块 pip3,但是当我运行以下命令时:

python3 -m pip install pipenv 

I get the follow output我得到以下输出

Requirement already satisfied: pipenv in ./Library/Python/3.7/lib/python/site-packages (2020.8.13)
Requirement already satisfied: certifi in ./Library/Python/3.7/lib/python/site-packages (from pipenv) (2020.6.20)
Requirement already satisfied: virtualenv in ./Library/Python/3.7/lib/python/site-packages (from pipenv) (20.0.31)
Requirement already satisfied: pip>=18.0 in ./Library/Python/3.7/lib/python/site-packages (from pipenv) (20.2.2)
Requirement already satisfied: virtualenv-clone>=0.2.5 in ./Library/Python/3.7/lib/python/site-packages (from pipenv) (0.5.4)
Requirement already satisfied: setuptools>=36.2.1 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from pipenv) (40.8.0)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in ./Library/Python/3.7/lib/python/site-packages (from virtualenv->pipenv) (1.7.0)
Requirement already satisfied: six<2,>=1.9.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from virtualenv->pipenv) (1.12.0)
Requirement already satisfied: appdirs<2,>=1.4.3 in ./Library/Python/3.7/lib/python/site-packages (from virtualenv->pipenv) (1.4.4)
Requirement already satisfied: filelock<4,>=3.0.0 in ./Library/Python/3.7/lib/python/site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: distlib<1,>=0.3.1 in ./Library/Python/3.7/lib/python/site-packages (from virtualenv->pipenv) (0.3.1)
Requirement already satisfied: zipp>=0.5 in ./Library/Python/3.7/lib/python/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->virtualenv->pipenv) (3.1.0)

First I would like to understand exactly what the warning is and more importantly why it is occurring.首先,我想确切地了解警告是什么,更重要的是它为什么会发生。 I have a feeling that it has to do with the pip that was used or the way int which the command was run.我有一种感觉,它与使用的 pip 或运行命令的 int 方式有关。

Secondly, I am curious as to why the pip doesn't work without the use of python3, why the pip3 works without the use of python3 but fails when it is used with python3.其次,我很好奇为什么 pip 在不使用 python3 的情况下不起作用,为什么 pip3 在不使用 python3 的情况下工作但在与 python3 一起使用时失败。 I understand that it probably has to do with the way that my system is configured, but I am trying how to best configure my system to my needs.我知道这可能与我的系统配置方式有关,但我正在尝试如何最好地根据我的需要配置我的系统。

Pip3 is the python 3 version, pip is for python2.7(which is no longer available). pip3 是python 3 版本,pip 是python2.7(不再可用)。 Your warnings are from your path being not matching.您的警告来自您的路径不匹配。 https://www.educative.io/edpresso/how-to-add-python-to-the-path-variable-in-mac will help explain it better. https://www.education.io/edpresso/how-to-add-python-to-the-path-variable-in-mac将有助于更好地解释它。

try: get_pip.py尝试:get_pip.py

Since python 3 is install, correct?由于安装了python 3,对吗? Try cd to the directory where you python 3 is saved, and run get_pip.py.尝试 cd 到保存 python 3 的目录,然后运行 ​​get_pip.py。 Then run the file with python3 get_pip.py.然后使用 python3 get_pip.py 运行该文件。 This should get pip3 installed on your machine.这应该会在您的机器上安装 pip3。

Also I had trouble getting it on my Mac for the first time, but the above worked fine for me.我第一次在我的 Mac 上安装它也遇到了麻烦,但以上对我来说效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM