简体   繁体   中英

Having trouble running django on Pycharm

I'm sure you guys have heard enough of these questions but I am a new programmer looking to start using Django. I have done pip install django and by the time it's almost done download I received a warning.

WARNING: The script django-admin.exe is installed in 'C:\Users\bryan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\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.

I have ignored this earlier and ran the command django-admin startproject and of course I receive another error. The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable program.

Not quite what to do. I need your help. Or at least direct me to a post similar to this matter. Thank you!

I have tried redirecting the PATH with pip install--install-option="--prefix=C:\Users\bryan\PycharmProjects\mySite" django I saw this on another post and thought it would help but nothing really worked.

It looks like you have globally installed Python with locally installed Python packages.

Option 1: try doing what Windows says: add the directory with locally installed Python packages to the Windows PATH.

Option 2: consider using virtual environments: https://docs.python.org/3/library/venv.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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