virtualenv 激活不起作用 [英] virtualenv activate does not work

查看:48
本文介绍了virtualenv 激活不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to create a virtual environment to test an api.

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

I can create the environment just fine using virtualenv test, then I can cd into it. When I try to run activate, I get this error:

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,它用 Windows Powershell 替换了 cmd.我的 virtualenv 与 cmd 一起工作得很好,所以我怀疑这可能与 Powershell 做事的方式有关.

I recently updated windows, and it replaced the cmd with Windows Powershell. My virtualenv worked fine with the cmd, so I suspect it may have to do with the way the Powershell does things.

如何激活 virtualenv?

How can I activate the virtualenv?

推荐答案

如果你按下WindowsKey + R,在弹出框输入cmd,它应该带使用命令行界面而不是 powershell!

If you press WindowsKey + R, and type cmd when the box comes up, it should bring up the command line interface instead of powershell!

这篇关于virtualenv 激活不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆