python - pipenv shell在虚拟环境中启动子shell… 'powershell.exe'无法识别为内部或外部命令,可操作程序或

标签 python django windows powershell pipenv

我正在使用Windows 10和Visual Studio Code终端(但我也尝试使用Windows Powershell)。

这是我的位置:PS C:\Users\MyUsername\Desktop\MyProjectFolder>
成功:pip install --user pipenv
成功:pipenv install django
最后,我得到消息:

To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

所以我运行:pipenv shell,只得到以下消息:
Launching subshell in virtual environment…
'powershell.exe' is not recognized as an internal or external command,
operable program or batch file.

我搜索了重复的问题,但找不到任何有用的信息。

最佳答案

将您的PATH变量更改为cmd.exe(位于system32文件夹中)
然后使用命令{pipenv location} shell
这应该可以解决问题。
XD

关于python - pipenv shell在虚拟环境中启动子shell… 'powershell.exe'无法识别为内部或外部命令,可操作程序或,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60072898/

相关文章:

python - hstore或json数据的Django数字比较?

python - 从列表中解压的类继承

django - 如何在Django中建立Gmail样式搜寻?

python - post_save.disconnect 根本不起作用

windows - 似乎无法让 Wix 安装驱动程序

python - 导入模块和 NameError : global name 'module' is not defined 的问题

Python SOAP 服务器/客户端

python - 在 Django 表单集上迭代时显示附加数据

windows - 进程终止后保持 Windows 控制台窗口打开

c - 为什么我在 c 中将异常附加到此 str 数组?