powershell 无法识别 pipelinev

Jos*_*nes 9 python powershell pip virtualenv pipenv

我确保pipenv安装在以下路径中C:\Users\Owner> pip install pipenv

然后得到如下回复:

Requirement already satisfied: setuptools>=36.2.1 in c:\users\owner\appdata\local\programs\python\python36-32\lib\
ackages (from pipenv) (39.0.1)
Requirement already satisfied: pip>=9.0.1 in c:\users\owner\appdata\local\programs\python\python36-32\lib\site-pac
(from pipenv) (20.1)
Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\users\owner\appdata\roaming\python\python36\site-pack
from pipenv) (0.5.4)
Requirement already satisfied: virtualenv in c:\users\owner\appdata\roaming\python\python36\site-packages (from pi
(16.0.0)
Requirement already satisfied: certifi in c:\users\owner\appdata\roaming\python\python36\site-packages (from pipen
20.4.5.1)
Run Code Online (Sandbox Code Playgroud)

之后,我尝试将其设置在特定目录中。然后我收到以下消息。

PS C:\Users\Owner\desktop\Python\Pyprojects> pipenv install
The term 'pipenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
ling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:7
+ pipenv <<<<  install
    + CategoryInfo          : ObjectNotFound: (pipenv:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)

之前一直提示我没有设置方向盘。所以,我安装了它。但是,现在我收到上述错误消息。我该如何解决这个问题?感谢您的帮助。

小智 11

看来你的 PATH 环境变量中没有 pipelinev 。

您应该检查您的 python 安装位置,例如我将其安装在 C:\Users\userName\AppData\Local\Programs\Python\Python38-32

在 PATH 环境变量中包含“python_install_location\Scripts”。例如

C:\Users\用户名\AppData\Local\Programs\Python\Python38-32\Scripts\

设置环境变量:

  1. 从文件资源管理器中打开控制面板\系统和安全\系统。
  2. 高级系统设置
  3. 环境变量...
  4. 选择路径并编辑
  5. 添加一个新行以包含上述路径。

脚本文件夹必须有一个条目,例如

管道脚本

验证运行 pipelinev --version

在此输入图像描述