为什么“pip”?尽管之前工作正常但现在停止工作了?

发布于 2025-01-15 20:19:25 字数 458 浏览 2 评论 0原文

我对编程有点陌生,现在已经学习了几周了。我正在关注 Corey Schafer 的基本 Python 视频和他的 Django 系列。为了运行服务器,我运行一个虚拟环境。 在 cmd 中(在项目目录中),我输入:

1-pip shell

2-python manage.py runserver

服务器运行,我处理该项目。

不是今天。 当我编写 pip shell 时,它给了我一个错误:“pip”不被识别为内部或外部命令、可操作程序或批处理文件。

在此处输入图像描述

我在卸载Python后重新安装了它。 pip 安装在我的系统上。我从系统中的 python 文件夹(脚本)添加了一个新变量。我没有工作,它仍然向我显示同样的错误。

I am a bit new to programming and have been learning for a few weeks now. I am following Corey Schafer basic python videos and in the middle of his Django Series. To run the server, I run a virtual env.
In cmd (in the project directory) I type:

1-pip shell

2-python manage.py runserver

The server runs and I work on the project.

Not Today. When I wrote pip shell, it gave me an error that: 'pip' is not recognized as an internal or external command, operable program or batch file.

enter image description here

I reinstalled Python after uninstalling it. pip is installed on my system. I added a new variable from the python folder (scripts) in my system. I did not work and it's still showing me the same error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

祁梦 2025-01-22 20:19:25

可能是您没有将正确的路径放入窗口中的 PATH 环境变量中。
另外,在您的图片中,您似乎没有激活 virtualenv,您可以看到来自 此处

.\env\Scripts\activate

It could be that you don't put the correct path in your PATH environment variable in window.
Also, in your picture, it looks like you didn't activate your virtualenv, you can see samples from here

.\env\Scripts\activate
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文