In this Post we will be learning how to install python on our Windows PC. First of all we need to be sure whether we are using 32-bit system or 64-bit. To find it out, right click on ‘This PC’ icon on your desktop and click ‘properties’, there you will find the ‘System type’.
Alternatively, you can do a Cortana search or ‘windows + F’ search for “System Information” to find out the same.
Once you are sure about your system type head to https://www.python.org/downloads/, it will show you the latest stable version of Python. It generally automatically detects your OS and shows you a download button for the latest version of Python for that OS. At the time of writing this blog, the version was 3.7.2
But in case of Windows, the things get little trickier, by default it will download the 32-bit installer and if you are on a 64-bit system, select windows from the above page and then select ‘Download Windows x86-64 executable installer’ on the next page to download the suitable installer.
Once, the ‘executable installer’ is downloaded, double click to open it and you will get the following screen:-
There are two things you need to follow here to successfully install Python:-
- You need to tick/select ‘Add Python 3.7 to PATH’
- You need to click on “Customize Installation” to get to next window (Very Important)
Now keep all the option especially ‘pip’ clicked/selected (this will be by default, and you need not change it)
Click next and select/tick the following options:-
- Install for all users
- Associate files with Python(requires the py launcher)
- Add Python to environment variables
- Precompile standard library
Set ‘Customize install location’ as ‘C:\Python3X’ (replace X to match the stable version you have downloaded e.g. Python37)
Once the installation is complete, search and open ‘Windows Powershell’ and type
python -V
If the output is :-
Python 3.7.2
or the version which you have installed you are good to go, otherwise uninstall Python and re-install it by following the exact steps mentioned above.
One more thing, we need to confirm is whether ‘pip’ is working or not? For that type the following in Powershell. if there is no error, the installation is fine.
pip freeze
if you get the following type of error, you will have to uninstall python and re-install the same using the exact steps as above.
The term 'pip' is not recognized as the name...
इस पोस्ट में हम Windows PC पर Python install करना सीखेंगे। सबसे पहले हमें यह सुनिश्चित करना पड़ेगा के हम 32-bit system इस्त्माल कर रहें है या 64-bit। यह पता लगाने के लिए सबसे पहले आप अपने desktop के ‘This PC’ इकोन पर right click करें व ‘properties’ चुने। वहाँ पर आपको ‘System type’ का पता चल जाएगा।
इसके इलावा आप “System Information” को Cortana search या ‘windows + F’ search से खोज सकते है व system type देख सकते है।
एक बार आप को system टाइप के बारें मे पता चल जाए तो आप https://www.python.org/downloads/ खोलें। यह आपको Python का latest stable version दिखाएगा. डिफ़ॉल्ट रूप से यह अपने आप आपके OS को detect कर लेगा व उस OS के लिए Python के latest stable version को download करने का विकल्प देगा। इस blog को लिखते समय ये version 3.7.2 था।
पर Windows के लिए कुछ चीजें जटिल हो जाती है व यह डिफ़ाल्ट रूप से 32-bit installer डाउनलोड करेगा। आप अगर 64-bit system पर है तो ऊपर के पेज से windows क्लिक करें व अगले पेज पे ‘Download Windows x86-64 executable installer’ पर क्लिक करके अपना मनचाहा installer डाउनलोड कर लें।
‘executable installer’ के डाउनलोड होने पर उसे डबल क्लिक करने से यह स्क्रीन आएगी।
Python को ठीक तरह से इन्स्टाल करने के लिए आपको निमंलिखित दो बातों का ध्यान रखना होगा:-
1. आपको ‘Add Python 3.7 to PATH’ को क्लिक/सिलैक्ट करना है।
2. “Customize Installation” पर क्लिक करके अगली window पर जाएँ (अतिआवश्यक)
अभ सभी options खासकर ‘pip’ को clicked/selected रहने दे। (ऐसा डिफ़ाल्ट रूप से ही होगा ओर आपको कोई परिवर्तन करने की आवश्यकता नहीं है।)
‘next’ windows पे निमंलिखित options select/tick करलें -
1. Install for all users
2. Associate files with Python(requires the py launcher)
3. Add Python to environment variables
4. Precompile standard library
‘Customize install location’ को ‘C:\Python3X’ (X को डाउनलोड किए हुए stable version से बदले e.g. Python37) सेट करें।
Installation पूरा होने पर, ‘Windows Powershell’ को ख़ोजे व खोलें ओर यह टाइप करें:-
python -V
अगर output यह :-
Python 3.7.2
या आपके द्वारा install किया हुआ version है तो आप Python चलाने के लिए तयार है। नहीं तो Python को uninstall करदे व एक बार फिर से ऊपर दिए हुए exact steps द्वारा दुबारा install करें।
हम इस बात की भी पुष्टि करना चाहेंगे के ‘pip’ चल रहा है या नहीं? इसके लिए Powershell पर निमंलिखित टाइप करे। अगर koi error नहीं आता तो Python व pip सही रूप से install हुआ है।
pip freeze
लेकिन अगर आपको निमंलिखित प्रकार का error आता है तो Python को uninstall करदे व एक बार फिर से ऊपर दिए हुए exact steps द्वारा दुबारा install करें।
The term 'pip' is not recognized as the name...