简体   繁体   English

我尝试使用 pip install django 安装 django,后来我升级 pip 时出错,我完成了升级 pip,但仍然出现如下我提到的错误

[英]I tried to install django using pip install django, later i get error to upgrade pip, i done upgrade pip, but still got error as below i mentioned

enter image description here WARNING: The script sqlformat.exe is installed in 'C:\\Users\\Easwar Sai Prasad\\AppData\\Roaming\\Python\\Python38\\Scripts' which is not on PATH.在此处输入图像描述警告:脚本 sqlformat.exe 安装在不在 PATH 上的“C:\\Users\\Easwar Sai Prasad\\AppData\\Roaming\\Python\\Python38\\Scripts”中。 Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.考虑将此目录添加到 PATH,或者,如果您希望取消此警告,请使用 --no-warn-script-location。 WARNING: The script django-admin.exe is installed in 'C:\\Users\\Easwar Sai Prasad\\AppData\\Roaming\\Python\\Python38\\Scripts' which is not on PATH.警告:脚本 django-admin.exe 安装在不在 PATH 上的“C:\\Users\\Easwar Sai Prasad\\AppData\\Roaming\\Python\\Python38\\Scripts”中。 Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.考虑将此目录添加到 PATH,或者,如果您希望取消此警告,请使用 --no-warn-script-location。

From what I understand is you are using a Windows machine and are trying to install django, and it's dependencies in an environment.据我了解,您正在使用 Windows 机器并尝试安装 django,并且它是环境中的依赖项。

You can do that but a much better way is to use Virtual Environments.您可以这样做,但更好的方法是使用虚拟环境。 With virtual environments you don't need to set any variables, you just have to activate your VEnv and install dependencies like normal pip3 install django在虚拟环境中,你不需要设置任何变量,你只需要激活你的 VEenv 并像普通的pip3 install django一样安装依赖项

Follow this guide https://docs.python.org/3/tutorial/venv.html按照本指南https://docs.python.org/3/tutorial/venv.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM