You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装Django时pip升级后出现脚本路径不在PATH中的警告问题

Fixing Django Installation PATH Warnings

Hey there! Let’s sort out those annoying PATH warnings you got after installing Django. Here’s a breakdown of what’s happening and how to fix it for good:

What’s the Issue?

The warnings are telling you that the scripts sqlformat.exe and django-admin.exe were installed in C:\Users\Easwar Sai Prasad\AppData\Roaming\Python\Python38\Scripts, but this directory isn’t listed in your system’s PATH environment variable.

Why does this matter? Because when you try to run commands like django-admin from your terminal or CMD, your system doesn’t know where to find these scripts—so you’ll get a "command not found" error unless you specify the full file path every time.

This is the permanent fix that lets you run django-admin and sqlformat from anywhere in your terminal. Here’s how to do it on Windows:

  • Right-click This PC (or My Computer) and select Properties.
  • Click Advanced system settings on the left sidebar.
  • In the pop-up window, go to the Advanced tab and click Environment Variables.
  • Under System variables, find the Path variable and click Edit.
  • Click New and paste the full directory path: C:\Users\Easwar Sai Prasad\AppData\Roaming\Python\Python38\Scripts
  • Click OK on all open windows to save the changes.
  • Restart your terminal/CMD—this is crucial for the new PATH settings to take effect.

Once done, you can run django-admin --version to verify it works without any warnings!

Solution 2: Suppress the Warning (Temporary Fix)

If you just want to hide the warning for a single installation (but note this doesn’t fix the underlying PATH issue), you can add the --no-warn-script-location flag to your pip install command:

pip install Django --no-warn-script-location

Keep in mind: Even with this, you’ll still need to use the full script path or add the directory to PATH later if you want to run django-admin easily.

内容的提问来源于stack exchange,提问作者Easwar Sai

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 19:54:06