Python कैसे इनस्टॉल करें?

Python Step-by-Step Guide for installation

python

python

Python  कैसे डाउनलोड करें?

Python एक बहु-उपयोगी और लोकप्रिय प्रोग्रामिंग भाषा है जिसका उपयोग विभिन्न क्षेत्रों में किया जाता है, जैसे वेब विकास (web development), डेटा विश्लेषण (data analysis), कृत्रिम बुद्धिमत्ता (Artificial Intelligence – AI), और भी बहुत कुछ। यह सीखने में अपेक्षाकृत आसान है और शुरुआती लोगों के लिए एक बेहतरीन विकल्प है।

आपको Python की आवश्यकता क्यों है?

यदि आप वेबसाइट बनाना चाहते हैं, डेटा का विश्लेषण करना चाहते हैं, मशीन लearning सीखना चाहते हैं, या कोई अन्य प्रोग्रामिंग प्रोजेक्ट शुरू करना चाहते हैं, तो Python एक शानदार विकल्प है। यह एक शक्तिशाली भाषा है जिसका उपयोग विभिन्न कार्यों के लिए किया जा सकता है।

Python कैसे डाउनलोड और इंस्टॉल करें

चरण 1: Python डाउनलोड करें

  1. अपना वेब ब्राउज़र खोलें और आधिकारिक Python वेबसाइट पर जाएं: [python.org].
  2. होमपेज पर, “Downloads” टैब ढूंढें और उस पर क्लिक करें।
  3. आपको डाउनलोड के लिए विभिन्न Python संस्करण दिखाई देंगे। नवीनतम संस्करण (उदाहरण के लिए, वर्तमान में Python 3.11.0 है) डाउनलोड करने के लिए उस पर क्लिक करें। यद्यपि, यदि आप किसी विशिष्ट प्रोजेक्ट के लिए किसी भिन्न संस्करण का उपयोग कर रहे हैं, तो उसे चुन सकते हैं। सामान्य तौर पर, नवीनतम संस्करण चुनना सर्वोत्तम होता है क्योंकि इसमें नवीनतम फीचर्स और बग फिक्स होते हैं।

स्टेप 2: इंस्टॉलर चलाएं

  1. एक बार डाउनलोड पूरा हो जाने के बाद, डाउनलोड की गई फ़ाइल ढूंढें (यह आमतौर पर आपके “Downloads” फ़ोल्डर में होती है) और उसे चलाने के लिए डबल-क्लिक करें।
  2. आपको एक सुरक्षा चेतावनी दिखाई दे सकती है। इंस्टॉलेशन जारी रखने के लिए “हां” या “चलाएं” पर क्लिक करें।
  3. अब Python इंस्टॉलर विंडो दिखाई देगी। सुनिश्चित करें कि “Add Python 3.x to PATH” के लिए चेकबॉक्स चुना हुआ है। यह आपके सिस्टम के PATH वातावरण चर (environment variable) में Python को जोड़ता है, जिससे कमांड प्रॉम्प्ट (या टर्मिनल) से आसानी से Python चलाना संभव हो जाता है। यदि आप इस बॉक्स को अनचेक छोड़ देते हैं, तो आपको भविष्य में Python को कमांड प्रॉम्प्ट से चलाने के लिए अतिरिक्त चरणों का पालन करना पड़ सकता है।
  4. इंस्टॉलेशन प्रक्रिया शुरू करने के लिए “इंस्टॉल करें अब” बटन पर क्लिक करें।

स्टेप 3: इंस्टॉलेशन पूरा होने का इंतजार करें

  1. इंस्टॉलर अब आपके कंप्यूटर पर Python को स्थापित करेगा। इस प्रक्रिया में कुछ मिनट लग सकते हैं, यह आपके सिस्टम की गति पर निर्भर करता है।
  2. इंस्टॉलेशन पूरा होने पर, आपको एक स्क्रीन दिखाई देगी जो इंगित करेगी कि Python सफलतापूर्वक स्थापित हो गया है। आप वैकल्पिक रूप से पथ लंबाई सीमा को अक्षम करने के लिए चेकबॉक्स चुन सकते हैं, लेकिन यह आमतौर पर आवश्यक नहीं होता है।
  3. इंस्टॉलर से बाहर निकलने के लिए “बंद करें” बटन पर क्लिक करें।

स्टेप 4: Python स्थापना सत्यापित करें

यह जांचने के लिए कि Python सही ढंग से स्थापित है, इन चरणों का पालन करें:

  1. कमांड प्रॉम्प्ट (Windows) या टर्मिनल (macOS/Linux) खोलें।
  2. निम्न आदेश टाइप करें और एंटर दबाएं:
python --version
  1. आपको इंस्टॉल किया गया Python संस्करण देखना चाहिए (उदाहरण के लिए, Python 3.12.3)। यदि यह संस्करण प्रदर्शित होता है, तो पुष्टि हो जाती है कि Python स्थापित है और कमांड लाइन से पहुँचा जा सकता है।

स्टेप 5: कोड लिखने के लिए जगह (Code Editor/IDE)

  1. आप Python code किसी भी text editor में लिख सकते हैं, लेकिन आसानी से लिखने के लिए आप एक code editor या Integrated Development Environment (IDE) इस्तेमाल कर सकते हैं. ये टूल्स आपको कई चीजें देते हैं जैसे code को अलग-अलग रंगों में हाइलाइट करना (syntax highlighting), कोड को पूरा करने में मदद (code completion), और bugs को खोजने में मदद (debugging). इससे कोडिंग करना आसान और अच्छा लगता है. कुछ popular options हैं:
  1. Python फाइल बनाएं: अपने चुने हुए editor या IDE में एक नई फाइल बनाएं. इस फाइल को ऐसे नाम दें जो आपके program के काम को बताए और फाइल के नाम के अंत में “.py” लगाएं (उदाहरण के लिए, hello.py).

  2. अपना Python code लिखें: अब मजेदार चीज! अपना code लिखें. Python की भाषा आसान और साफ़ होती है, इसलिए यह शुरुआती लोगों के लिए अच्छी भाषा है. यहां एक आसान उदाहरण है जिससे आप शुरू कर सकते हैं:

Python
print("Hello, World!")

यह code सिर्फ “Hello, World!” message को console पर दिखाता है.

  1. अपना Python program चलाएं: अपना code लिखने के बाद, फाइल को save करें. अब अपना Command Prompt (Windows) या Terminal (Mac/Linux) खोलें और उस directory में जाएं जहां आपने अपनी Python फाइल save की है. अपना program चलाने के लिए ये टाइप करें.
python filename.py

“filename.py” को अपनी असली फाइल के नाम से बदल दें.

उदाहरण के लिए, ये हमारा command होगा:

python hello.py

यह command “Hello, World!” को आपके console पर दिखाएगा, इसका मतलब है कि आपका Python program चल गया है.

बधाई हो! आपने Python install किया, अपना पहला program लिखा, और उसे चलाया. यह आपके Python coding journey की सिर्फ शुरुआत है. Python की ताकत के साथ आप कई चीजें बना सकते हैं जैसे वेबसाइट बनाना, data analysis करना, machine learning सीखना, और भी बहुत कुछ. Happy coding!

English Version

A Beginner’s Guide to Installing Python: Step-by-Step Instructions

Introduction:
Python is a versatile and popular programming language used in various fields, including web development, data analysis, artificial intelligence, and more. If you’re new to Python and eager to start coding, installing it on your computer is the first step. This guide will walk you through the process of installing Python on your system, regardless of whether you’re using Windows, macOS, or Linux.

Step 1: Download Python Installer
1. Open your web browser and go to the official Python website: python.org.
2. On the homepage, locate the “Downloads” tab and click on it.
3. You will see different versions of Python available for download. Choose the latest version (e.g., Python 3.9.7) by clicking on it.

Step 2: Run the Installer
1. Once the installer is downloaded, locate the file (it’s usually in your Downloads folder) and double-click on it to run.
2. You may see a security warning. Click “Yes” or “Run” to proceed with the installation.
3. The Python installer window will appear. Make sure the checkbox “Add Python 3.x to PATH” is checked. This ensures that Python is added to your system’s PATH environment variable, making it easier to run Python from the command line.
4. Click on the “Install Now” button to begin the installation process.

Step 3: Wait for Installation to Complete
1. The installer will now install Python on your computer. This process may take a few minutes, depending on your system’s speed.
2. Once the installation is complete, you will see a screen indicating that Python has been successfully installed. You can also choose to disable the path length limit by checking the corresponding checkbox, although this is optional.
3. Click on the “Close” button to exit the installer.

Step 4: Verify Python Installation
1. To ensure that Python has been installed correctly, open the Command Prompt (Windows) or Terminal (macOS/Linux).
2. Type the following command and press Enter:

python –version

3. You should see the version of Python you installed (e.g., Python 3.12.3) displayed on the screen. This confirms that Python is installed and accessible from the command line.

Step 5: Start Coding!
1. Now that Python is installed on your computer, you’re ready to start coding!
2. You can use any text editor or integrated development environment (IDE) to write Python code. Popular choices include Visual Studio Code, PyCharm, and IDLE (which comes bundled with Python).
3. Create a new Python file with a “.py” extension, write your code, and save the file.
4. To run your Python program, open the Command Prompt or Terminal, navigate to the directory where your Python file is saved, and type:

python filename.py

Replace “filename.py” with the name of your Python file.

Congratulations! You’ve successfully installed Python on your computer and are now ready to embark on your programming journey. With Python installed, the possibilities are endless, whether you’re interested in web development, data analysis, machine learning, or any other field that Python supports. Happy coding!

Exit mobile version