pip से Django Install करना
In this page:
पहले pip Upgrade करना
Packages install करने से पहले यह अच्छी practice है कि आप खुद pip upgrade करें, क्योंकि एक पुराना pip version नए package releases को सही से resolve करने में fail हो सकता है।
उदाहरण: Upgrading pip First
Upgrades pip to its latest version before installing other packages.
pip install --upgrade pip
⚠️ Run this in your own terminal or Node.js environment.
Latest Django Install करना
बिना किसी version number के "pip install django" run करना हमेशा PyPI पर available Django का सबसे नया stable release install करता है।
उदाहरण: Installing the Latest Django
Installs the newest available version of Django.
pip install django
⚠️ Run this in your own terminal or Node.js environment.
एक Specific Django Version Install करना
"==" के बाद एक version number जोड़ना, जैसे "pip install django==5.0", उस exact Django release को install करता है बजाय सबसे नए के।
उदाहरण: Installing a Specific Django Version
Installs the exact Django version 5.0 instead of the latest release.
pip install django==5.0
⚠️ Run this in your own terminal or Node.js environment.
Dependencies को एक File में Save करना
"pip freeze > requirements.txt" run करना हर installed package और इसका version एक file में लिख देता है, ताकि teammates बाद में exact same setup install कर सकें।
उदाहरण: Saving Dependencies to a File
Saves the currently installed packages and versions into a requirements.txt file.
pip freeze > requirements.txt
⚠️ Run this in your own terminal or Node.js environment.
- Intended virtual environment पहले activate किए बिना pip install run करना।
- एक outdated pip version उपयोग करना, जो नए Django releases install करने में fail हो सकता है।
- एक specific Django version install करते समय number गलत type करना, जैसे "django==5..0"।
- pip Python का standard package manager है libraries install करने के लिए।
- "pip install django" latest stable Django release install करता है।
- आप "pip install django==5.0" से एक specific version pin कर सकते हैं।
- Installed packages को share करने के लिए एक requirements.txt file में save किया जा सकता है।
Chapter Quiz — Complete all 9 topics to unlock
0/9 topics done
Complete these topics first: