Step by step python installation

Installing Python: How to start writing Python code

Would you like to start coding in Python but don’t know where to begin? Maybe you’ve graduated from an online course like Python Basics and now are looking to continue your Python adventure on your own machine.

But first, why Python?

The answer is simple: Python is a very easy-to-learn and powerful programming language. And that’s why it’s gaining so much popularity among people looking to start programming.

Python doesn’t have complicated syntax or difficult rules. At its core, Python is a practical programming language that’s used in:

  • Web development
  • Data analysis
  • Artificial intelligence
  • Natural language processing
  • Scientific computing

You can also build lots of different web, desktop, or smartphone apps in Python. With its various modules, Python makes it easy to learn new programming concepts and build increasingly complex applications.

Step-by-step Python installation

Let’s start by installing Python. You can download it for free from the official python website. Python can be installed on:

Let’s take a look at how to install it on each of these popular OSes.

Installing Python on Windows

If you’re on Windows, there’s more than one way to install Python. You can download the 32-bit or 64-bit version of Python using a(n):

We’ll download Python 3.7.0 using the executable installer (python-3.7.0-amd64.exe). Why this kind of installer? Because it has flexible user interface and contains all we need to write and run our scripts in Python.

Once you download the installer, run it and follow the steps below.

In the first installation window, we can choose type of installation: Install Now or Customize. If you don’t want to change the installed tools or settings, choose the first option. Also, be sure to check the Add Python 3.7 to PATH box at the bottom of the window to inform your OS where it can find the Python executable so that it may be invoked from the command line.

The installation process starts.

On the last window, click the Close button. You’re done!

In your Start menu, you should see a list of Python 3.7 tools.

Installing Python on Mac OS

Python 2.7 comes pre-installed on macOS, but that’s not the latest version of the language. To take advantage of the latest Python features, you will need to download and install the proper version from the Python website.

Let’s start by heading to the Python downloads page.

Click the yellow «Download Python 3.7.0» button, and you’ll get the latest version of Python for Mac OS.

Open the downloaded file; the Python Installer will show up. Go through the next steps by clicking Continue.

Click Install to start the installation process.

Enter your password when prompted.

The installation will begin and finish shortly.

And that’s it—you’re done! As in Windows, Python 3.7.0 for macOS comes with IDLE already, so just open your Launchpad, find IDLE, and start coding right away! 😃

Читайте также:  Тег NOSCRIPT

Installing Python on Linux

We’ll download Python 3.7 on Ubuntu 17.10 (64-bit). There’s no «right» way to do this, but we’ll use the apt-get tool.

Open your terminal and type:

This downloads packages from remote repositories and updates them.

sudo apt-get install python3.7

Once all packages have been installed, type the following command in the terminal:

This will launch the Python interpreter, where you can write scripts or perform calculations in real time.

IDLE: a simple Python IDE

Standard Python installations on OSes come with the IDLE Python interactive development environment (IDE). On Linux to install IDLE you type in Terminal:

An IDE provides a user-friendly interface and environment where you can write code; sometimes, IDEs have built-in suggestion support (like the Python extension for Intellisense). Here’s how you launch IDLE:

  • Mac and Windows: go to your Python installation folder and select IDLE.
  • Linux: type idle-python3.7 in the terminal.

You’ll notice that a shell window appears. Here, you can write your Python code, and you can also run it. To create a new script, simply go to File › New File.

Write your code in this editor, and save it with the .py extension (File → Save As or Ctrl+Shift+S).

Afterwards, you can run the script using the F5 key or by choosing Run → Run Module from the menu.

You will see the result in a shell:

Python tips, extensions, and plugins

The Python IDLE editor is great for beginners, as it doesn’t have any extra features that get in your way. Check out the other options below for more Python IDEs:

  • Thonny: An easy and simple IDE created specially for beginners, but with more features. It’s very friendly and contains only the necessary tools. This IDE is available on Mac OS X, Windows, and Linux.
  • PyCharm: The most popular Python IDE for beginners and professionals alike. PyCharm integrates tons of libraries and can be extended with plugins. It offers frameworks for web development and scientific computations. This IDE is available for free in the Community edition and paid in the Professional edition. It supports Mac OS X, Windows, and Linux.
  • Spyder: (A free, open-source IDE mainly for scientists, engineers, and data analysts. It contains plenty of data science packages for data exploration and visualization. You can install it on Mac OS X, Windows, and Linux.

In any case, you have plenty of options available to choose from for a Python IDE. If you mainly work with Java, for example, then you can install the PyDev IDE for integration with Eclipse. And if you build applications in Visual Studio, you may find the Python Tools for Visual Studio (PTVS) extension worthwhile.

Summary

It’s extremely easy to start programming nowadays with lots of online courses on platforms like LearnPython.com, but students often wonder how they can continue programming on their own, outside these sandbox environments. As you can see, the process is really quite simple! All you need is the language of your choice (in this case, Python ) and an IDE, and you’re good to go. Happy coding!

Источник

Python Installation Tutorial: A Step by Step Complete Guide

Numpy Element Wise Multiplication featured image

Python is the popular programming language. In-fact you will see the code of python language as English language. Python 2 and Python 3 are the two major versions of Python. But , Python Installation for both the versions are different. In addition ,Commands and path environment variables for both the versions are different. You can choose your python version according to your requirement. Beginners always faces challenges of installing Python in their operating system. This article Python Installation tutorial is for them. Introduction to Python Programming article is a complete guide for beginners to know more about Python. You will know how to install python in Windows, Linux, MacOS. How to check your Python versions . You make sure to install python carefully by reading all the steps described here otherwise it may be wrongly install.

Читайте также:  Examples

Python Installation Tutorial for Windows

In this section, you will know how to do Python installation in the Windows OS. First we will cover for the latest Python 3 version and then Python 2 version. You can either install both the versions or choose the version according to your end goal.

Python 3 Major Version Installation

Step 1 – Download the latest Python 3.x version. At the time of writing this article latest version was Python 3.6.4. Download Windows x86 – 64 executable file only as installer will automatically install 32 or 64 bit of Python according to the system configuration.

Python Releases for Windows Python org

Step 2 – Open the executable file and Check the Add Python 3.6 to PATH. Then click the Install Now button. It will show the installation progress.

python installation 3.6 Setup1

Step 3 – When the installation progress is completed, you will see the Disable path length limit. Now you must be thinking what is it and whats will happen if I will disable it. The answer is clear, it will remove the limitations on MAX_PATH variable. It will allow to use long path names for the Python. We recommend you to not disable this option as it will remove any path related issues while working in Windows. Therefore click on the close button to finish the installation.

Python 3.6 Setup2

Step 4 – Now, the Python 3.6 is installed. You can check it either it is properly installed or not. You can do it through Command Prompt. Open the command prompt and type the following command. It will output the version of the Python.

Python 3.6 Setup3

Congratulation, you have successfully installed Python 3 version. In the next section you will know how to install Python 2.x versions. If you want to know the difference between Python 3 and Python 2 ,features and application, you can read the Introduction to Python Programming , a complete guide for beginners.

Python 2 Major Version Installation

Step 1 – Download the latest Python 2.x version. The latest version at the time of writing this article is Python 2.7.14. You can also download the other versions by scrolling down. But we recommend you to download the latest releases. Choose the Windows x86-64 MSI installer to install in 32 bit or 64 bit Windows OS.

Python 2.x Releases for Windows Python org

Step 2- Run the installer and select install for all users. Click “next ” button to continue.

Python 2.7.14 Setup1

You will see the choice to select destination directory. Leave as it is and click the “Next Button”.

Python 2.7.14 Setup2

Step 3 – After the step 2 you have to do some customization. Scroll down and click on Add python.exe to path and select “Will be installed on local hard drive“. Then click on the Next button to complete the installation progress.

Python 2.7.14 Setup3

Step 4- The Python 2.7.14 had been installed. In addition you have to check whether it has been properly install or not. You have to use the same following command. It will output the python version.

Читайте также:  Image в си шарп

python 2..7.14 command prompt

If you are seeing the above output, then congratulation you have successfully install the Python 2.7.14 version.

Python Installation Tutorial for Linux

Linux is an open source Operating System. There are many Linux based operating systems. Popular are Ubuntu, Fedora, Linux Mint, Debian. In this section you will learn how to do python installation for both Python 3 and Python 2 versions. Fedora Linux OS used for Installation of python. Most of the newer Linux based Operating system have already installed Python. You will check it is installed or not by the typing the following commands in terminal.

You will see the python versions as output like in the below screenshot. But if you are not seeing then , you have to install Python . Follow the following steps for successful install.

linux python version check

Open the terminal or Command prompt from your linux based OS. Type the following commands.

If you are using Ubuntu 16.0 or newer version, then you can easily install Python 3.6 or Python 2.7 by typing the following commands

$ sudo apt-get update $ sudo apt-get install python3.6
$ sudo apt-get update $ sudo apt-get install python2.7

Newer Versions of Fedora have pre-installed both the versions of Python. In case , you are using other Linux distribution there is more chance that Python is pre-installed.

Python Installation Tutorial for MacOs

MacOs is an operating system developed by the Apple Inc. It is just like Windows Operating System and other operating system. Most of the newer versions of MacOS have pre-installed python. You can check python is installed or not by the following commands.

Python 3 or Python 2 Major Version Installation

Download the Python 3 or 2 new version. At the time of writing this post , Python 3.6 or Python 2.7 was the newer version. Download the Mac OS X 64-bit/32-bit installer. Run the package and following the installation steps to install the python packages.

Python Releases for Mac OS X Python org (2)

After the successful installation , you can check the python version by using the same command.

Anaconda for Python –

Stand alone python is self sufficient for development. We may package manager and install the other dependencies over it. It make the deployment lean. But If you need a bundle of dependencies, you may Installing Anaconda distribution ( specially for Data science).

End Notes

Python Installation on Windows, Linux and MacOS can be a difficult task for beginners. In fact, You have to carefully follow the installation steps for completion. The above steps for the python installation must be followed for successful installing. Otherwise, it may lead error and you will unable to find Python Version when you check on command prompt. I hope this article must have solved your query about how to do python instillation. Anyways Don’t forget to subscribe our blog for latest post on python programming language. Also, You may write suggestions and comment in comment box below . In addition, You may also request new articles , We will enjoy to interact with you.

Data Science Learner Team

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

We respect your privacy and take protecting it seriously

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Источник

Оцените статью