gpt4 book ai didi

python - virtualenv 激活不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 09:59:49 26 4
gpt4 key购买 nike

我正在尝试创建一个虚拟环境来测试 api。

我可以使用 virtualenv test 创建环境,然后我可以 cd 进入它。当我尝试运行 activate 时,出现此错误:

PS C:\Users\Bright Bridge\Desktop\autocomplete_demo\Scripts> activate
activate : The term 'activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ activate
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command activate was not found, but does exist in the current location. Windows PowerShell does not load commands from the current
location by default. If you trust this command, instead type: ".\activate". See "get-help about_Command_Precedence" for more details.

我最近更新了 windows,并将 cmd 替换为 Windows Powershell。我的 virtualenv 与 cmd 配合得很好,所以我怀疑这可能与 Powershell 做事的方式有关。

如何激活虚拟环境?

最佳答案

如果您按下 WindowsKey + R,并在出现框时键入 cmd,它应该会调出命令行界面而不是 powershell!

关于python - virtualenv 激活不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44194427/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com