Windows:如何在使用pipenv时显示环境?

问题描述 投票:1回答:1

Windows 10

我目前的PowerShell基础环境

PS C:\Users\micah\Dev\try-zappa> pip freeze
certifi==2018.11.29
pipenv==2018.11.26
virtualenv==16.4.0
virtualenv-clone==0.5.1

当我运行pipenv shell时,它会带我进入我的新环境。

PS C:\Users\micah\Dev\try-zappa> pipenv shell
Launching subshell in virtual environment…
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\micah\Dev\try-zappa> pip freeze
argcomplete==1.9.3
awacs==0.8.2
awscli==1.16.106
boto3==1.9.96
botocore==1.12.96
certifi==2018.11.29
cfn-flip==1.1.0.post1

但是,只要查看命令行,我就会看到PS C:\Users\micah\Dev\try-zappa>而不是描述性的东西,它向我显示我的环境是活跃的,就像你使用pip并激活一个环境一样。 (例如(try-zappa) PS C:\Users\micah\Dev\try-zappa>

有谁知道怎么打开它?我讨厌认为我在一个环境中,但实际上在另一个环境中。

powershell windows-10 pipenv
1个回答
0
投票

我现在无法证实我的假设,但是:

  • pipenv本身不会在一个shell中更改命令提示符
  • 一个人需要激活一个shell的插件(在你的情况下是powershell)来改变激活 - 停用virtualenv的提示。

我想你需要virtualenvwrapper-powershell

© www.soinside.com 2019 - 2024. All rights reserved.