pip install Django
WARNING: The script django-admin.exe is installed in 'C:\Users\Xiaow\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
因为这个原因,我不能开始任何新的项目。如何将此脚本安装到PATH?我有什么命令要做吗
“C:\Users\Xiaow”中似乎还有一个.vscode文件夹,但我不知道这是否是Django不将管理脚本安装到PATH的原因
其他一切都可以工作,比如我可以转到我现有的项目(从旧计算机复制过来)和运行服务器,并且可以访问所有数据库。然而,正是这个管理脚本造成了问题。我还尝试卸载并重新安装Django,但没有成功
完整的终端信息:
PS C:\Code> pip install Django
Defaulting to user installation because normal site-packages is not writeable
Collecting Django
Using cached Django-3.1.4-py3-none-any.whl (7.8 MB)
Requirement already satisfied: pytz in c:\users\xiaow\appdata\roaming\python\python39\site-packages (from Django) (2020.4)
Requirement already satisfied: sqlparse>=0.2.2 in c:\users\xiaow\appdata\roaming\python\python39\site-packages (from Django) (0.4.1)
Requirement already satisfied: asgiref<4,>=3.2.10 in c:\users\xiaow\appdata\roaming\python\python39\site-packages (from Django) (3.3.1)
Installing collected packages: Django
WARNING: The script django-admin.exe is installed in 'C:\Users\Xiaow\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Django-3.1.4