Easy Install Python Windows 10

 admin

Related

Jan 27, 2019  See the Installation Instructions in the Python Packaging User’s Guide for instructions on installing, upgrading, and uninstalling Setuptools. Questions and comments should be directed to the distutils-sig mailing list.Bug reports and especially tested patches may be submitted directly to the bug tracker. To report a security vulnerability, please use the Tidelift security contact.

May 23, 2015  Setting up your Windows 10 System for Python Development (PyDev, Eclipse, Python) In this article I’ll explain how you can set-up your Windows 10 machine for some extreme Python development. UPDATE: Here is a video version of the tutorial (updated to. Welcome to the first tutorial. Here we will learn how to properly install Python on Windows 10 Operating System. In this blog, we will Install Python 3.7.1 which is the latest version as of today for Windows 10 64 bit operating system. Windows Notes On Windows, an ``easyinstall.exe`` launcher will also be installed, so that you can just type ``easyinstall`` as long as it's on your ``PATH``. If typing ``easyinstall`` at the command prompt doesn't work, check to make sure your ``PATH`` includes the appropriate ``C:Python2XScripts`` directory. Windows 10 May 2019 update opens up a new, world of Python 3 on Windows. If you want to learn more about using Python, go to python.org, where you can find documentation, community and more. Documentation for Python's standard library, along with tutorials and guides, are available at docs.python.org.

Building Go Applications for Different Operating Systems and Architectures Tutorial

Introduction

Python is a versatile programming language that can be used for many different programming projects. First published in 1991 with a name inspired by the British comedy group Monty Python, the development team wanted to make Python a language that was fun to use. Easy to set up, and written in a relatively straightforward style with immediate feedback on errors, Python is a great choice for beginners and experienced developers alike. Python 3 is the most current version of the language and is considered to be the future of Python.

This tutorial will guide you through installing Python 3 on your local Windows 10 machine and setting up a programming environment via the command line.

Prerequisites

You will need a Windows 10 computer with administrative access that is connected to the internet.

Step 1 — Opening and Configuring PowerShell

We’ll be completing most of our installation and setup on a command-line interface, which is a non-graphical way to interact with your computer. That is, instead of clicking on buttons, you’ll be typing in text and receiving feedback from your computer through text as well. The command line, also known as a shell, can help you modify and automate many of the tasks you do on a computer every day, and is an essential tool for software developers.

PowerShell is a program from Microsoft that provides a command-line shell interface. Administrative tasks are performed by running cmdlets, which are pronounced command-lets, specialized classes of the .NET software framework that can carry out operations. Open-sourced in August 2016, PowerShell is now available across platforms, for both Windows and UNIX systems (including Mac and Linux).

To find Windows PowerShell, you can right-click on the Start menu icon on the lower left-hand corner of your screen. When the menu pops up, you should click on “Search,” then type “PowerShell” into the search bar. When you are presented with options, right-click on “Windows PowerShell,” the Desktop app. For our purposes, we’ll select “Run as Administrator.” When you are prompted with a dialogue box that asks “Do you want to allow this app to make changes to your PC?” click on “Yes.”

Once you do this, you’ll see a text-based interface that has a string of words that looks like this:

We can switch out of the system folder by typing the following command:

Then we’ll be in a directory such as PS C:UsersSammy.

To continue with our installation process, we are going to set up some permissions through PowerShell. Configured to run in the most secure mode by default, there are a few levels of permissions that you can set up as an administrator:

  • Restricted is the default execution policy, under this mode you will not be able to run scripts, and PowerShell will work only as an interactive shell.
  • AllSigned will enable you to run all scripts and configuration files that are signed by a trusted publisher, meaning that you could potentially open your machine up to the risk of running malicious scripts that happen to be signed by a trusted publisher.
  • RemoteSigned will let you run scripts and configuration files downloaded from the internet signed by trusted publishers, again opening your machine up to vulnerabilities if these trusted scripts are actually malicious.
  • Unrestricted will run all scripts and configuration files downloaded from the internet as soon as you confirm that you understand that the file was downloaded from the internet. In this case no digital signature is required so you could be opening your machine up to the risk of running unsigned and potentially malicious scripts downloaded from the internet.

We are going to use the RemoteSigned execution policy to set the permission for the current user that allows the PowerShell to accept downloaded scripts that we trust without making the permissions as broad as they would be with an Unrestricted permission. In the PowerShell, let’s type:

PowerShell will then prompt us to provide an execution policy, and since we want to use RemoteSigned, we’ll type:

Once we press enter we’ll be asked if we do want to change the execution policy. Type the letter y for “yes,” and allow the changes to take effect. We can confirm that this worked by asking for the current permissions across the machine by typing:

You should receive output that looks something like this:

This confirms that the current user can run trusted scripts downloaded from the internet. We can now move on to downloading the files we will need to set up our Python programming environment.

Step 2 — Installing the Package Manager Chocolatey

A package manager is a collection of software tools that work to automate installation processes that include the initial installation, upgrading and configuring of software, and removing software as needed. They keep software installations in a central location and can maintain all software packages on the system in formats that are commonly used.

Chocolatey is a command-line package manager built for Windows that works like apt-get does on Linux. Available in an open-source version, Chocolatey will help you quickly install applications and tools, and we will be using it to download what we need for our development environment.

Ayyappa songs in telugu video. Topics, Language.

Before we install the script, let’s read it to confirm that we are happy with the changes it will make to our machine. To do this, we will use the .NET scripting framework to download and display the Chocolatey script within the terminal window. We’ll create a WebClient object called $script (you can call it whatever you want as long as you use $ as the first character), that shares Internet connection settings with Internet Explorer:

Let’s look at the options that we have available to us by piping the object to the Get-Member class to return all members (properties and methods) of this WebClient object:

Looking over the output, we can identify the DownloadString method that we can use to display the script and signature in the PowerShell window. Let’s implement this method:

After we inspect the script, we can install Chocolatey by typing the following into PowerShell:

The cmdlet iwr or Invoke-WebRequest allows us to extract data from the web. This will pass the script to the iex or Invoke-Expression cmdlet, which will execute the contents of the script, running the installation script for the Chocolatey package manager.

Allow PowerShell to install Chocolatey. Once it is fully installed, we can begin installing additional tools with the choco command.

If we need to upgrade Chocolatey at any time in the future, we can run the following command:

With our package manager installed, we can go on to install the rest of what we need for our Python 3 programming environment.

Step 3 — Installing the Text Editor nano (Optional)

We are now going to install nano, a text editor that uses a command line interface, which we can use to write programs directly within PowerShell. This is not a compulsory step, as you can alternatively use a text editor with a graphical user interface such as Notepad, but nano will get us more accustomed to using PowerShell.

Let’s use Chocolatey to install nano:

Here we used the -y flag so that we confirm automatically that we want to run the script without being prompted.

Once nano is installed, we will be able to use the nano command to create new text files and will eventually use it to write our first Python program.

Step 4 — Installing Python 3

Just like we did with nano above, we will use Chocolatey to install Python 3:

PowerShell will now install Python 3, generating output within PowerShell during that process.

Once the process is completed, you should see the following output:

With the installation finished, you’ll want to confirm that Python is installed and ready to go. To see the changes, use the command refreshenv or close and re-open PowerShell as an Administrator, then check the version of Python available to you on your local machine:

You should get output such as:

Alongside Python, pip will be installed, which will manage software packages for Python. Let’s ensure that pip is up-to-date by upgrading it:

With Chocolatey, we can call Python 3 with the python command. We will use the -m flag to run the library module as a script, terminating the option list, and from there use pip to install its upgrade.

Once Python is installed and pip updated, we can set up a virtual environment for our development projects.

Step 5 — Setting Up a Virtual Environment

Now that we have Chocolatey, nano, and Python installed, we can go on to create our programming environment with the venv module.

Virtual environments enable you to have an isolated space on your computer for Python projects, ensuring that each of your projects can have its own set of dependencies that won’t disrupt any of your other projects.

Setting up a programming environment provides us with greater control over our Python projects and over how different versions of packages are handled. This is especially important when working with third-party packages.

You can set up as many Python programming environments as you want. Each environment is basically a directory or folder in your computer that has a few scripts in it to make it act as an environment.

Choose which directory you would like to put your Python programming environments in, or create a new directory with mkdir, as in:

Once you are in the directory where you would like the environments to live, you can create an environment by running the following command:

Using the python command, we will run the venv library module to create the virtual environment that in this case we have called my_env.

Essentially, venv sets up a new directory that contains a few items which we can view with the ls command:

Together, these files work to make sure that your projects are isolated from the broader context of your local machine, so that system files and project files don’t mix. This is good practice for version control and to ensure that each of your projects has access to the particular packages that it needs.

To use this environment, you need to activate it, which you can do by typing the following command that calls the activate script in the Scripts directory:

Your prompt will now be prefixed with the name of your environment, in this case it is called my_env:

This prefix lets us know that the environment my_env is currently active, meaning that when we create programs here they will use only this particular environment’s settings and packages.

Step 6 — Creating a Simple Program

Now that we have our virtual environment set up, let’s create a simple “Hello, World!” program. This will make sure that our environment is working and gives us the opportunity to become more familiar with Python if we aren’t already.

To do this, we’ll open up nano and create a new file:

Install Python 3.6 Windows 10

Once the text file opens up in Terminal we’ll type out our program:

Exit nano by typing the control and x keys, and when prompted to save the file press y then the enter key.

Once you exit out of nano and return to your shell, let’s run the program:

The hello.py program that you just created should cause Terminal to produce the following output:

To leave the environment, simply type the command deactivate and you will return to your original directory.

Conclusion

Congratulations! At this point you should have a Python 3 programming environment set up on your local Windows 10 machine and can begin a coding project!

To set up Python 3 on another computer, follow the local programming environment guides for Ubuntu 16.04, Debian 8, CentOS 7, or macOS. You can also read about installing Python and setting up a programming environment on an Ubuntu 16.04 server, which is especially useful when working on development teams.

With your local machine ready for software development, you can continue to learn more about coding in Python by following “Understanding Data Types in Python 3” and “How To Use Variables in Python 3”.

Python doesn’t come prepackaged with Windows, but that doesn’t mean Windows users won’t find the flexible programming language useful. It’s not quite a simple as installing the newest version however, so let’s make sure you get the right tools for the task at hand.

First released in 1991, Python is a popular high-level programming language used for general purpose programming. Thanks to a design philosophy that emphasizes readability it has long been a favorite of hobby coders and serious programmers alike. Not only is it an easy language (comparatively speaking, that is) to pick up but you’ll find thousands of projects online that require you have Python installed to use the program.

Which Version Do You Need?

Unfortunately, there was a significant update to Python several years ago that created a big split between Python versions. This can make things a bit confusing to newcomers, but don’t worry. We’ll walk you through installing both major versions

Install Python 3.7 Windows

When you visit the Python for Windows download page, you’ll immediately see the division. Right at the top, square and center, the repository asks if you want the latest release of Python 2 or Python 3 (2.7.13 and 3.6.1, respectively, as of this tutorial).

RELATED:Add Dungeons, Ruins, and Treasure Hunts to Your Minecraft World with MCDungeon

Newer is better, right? Maybe so, maybe not. The version you want depends on your end goal. Let’s say, for example, that you read our article about expanding your Minecraft world with MCDungeon and are excited to add cool stuff to your worlds. That project is coded in Python and requires Python 2.7—you can’t run the MCDungeon project with Python 3.6. In fact, if you’re exploring hobby projects like MCDungeon, you’ll find that nearly all of them use 2.7. If your goal is to get some project that ends in a “.py” extension up and running, then there’s a very, very good chance you’ll need 2.7 for it.

On the other hand, if you’re looking to actually learn Python, we recommend installing both versions side by side (which you can do with zero risk and only a tiny bit of setup hassle). This lets you work with the newest version of the language, but also run older Python scripts (and test backwards compatibility for newer projects). Comparing the two versions is an article unto itself, though, so we’ll defer to the Python project wiki where you can read their well written overview of the differences.

You can download just Python 2 or Python 3 if you’re sure you only need a particular version. We’re going the distance today and will be installing both of them, so we recommend you download both versions and do the same. Under the main entry for both versions you’ll see an “x86-64” installer, as seen below.

RELATED:What’s the Difference Between 32-bit and 64-bit Windows?

This installer will install the appropriate 32-bit or 64-bit version on your computer automatically (here’s some further reading if you want to know more about the differences between the two).

How to Install Python 2

Installing Python 2 is a snap, and unlike in years past, the installer will even set the path variable for you (something we’ll be getting into a bit later). Download and run the installer, select “Install for all users,” and then click “Next.”

On the directory selection screen, leave the directory as “Python27” and click “Next.”

On the customization screen, scroll down, click “Add python.exe to Path,” and then select “Will be installed on local hard drive.” When you’re done, click “Next.”

You don’t have to make any more decisions after this point. Just click through the wizard to complete the installation. When the installation is finished, you can confirm the installation by opening up Command Prompt and typing the following command:

Success! If all you need is Python 2.7 for some project or another, you can stop right here. It’s installed, the path variable is set, and you’re off to the races.

How to Install Python 3

If you want to learn the newest version of Python, you’ll need to install Python 3. You can install it alongside Python 2.7 with no problems, so go ahead and download and run the installer now.

On the first screen, enable the “Add Python 3.6 to PATH” option and then click “Install Now.”

Next, you have a decision to make. Clicking the “Disable path length limit” option removes the limitation on the MAX_PATH variable. This change won’t break anything, but will allow Python to use long path names. Since many Python programmers are working in Linux and other *nix systems where path name length isn’t an issue, turning this on in advance can help smooth over any path-related issues you might have while working in Windows.

RELATED:How to Make Windows 10 Accept File Paths Over 260 Characters

We recommend go ahead and selecting this option. If you know you don’t want to disable the path length limit, you can just click “Close” to finish the installation. And, if you want to read more about the issue before committing to the change, read up here.

Pip Python

If you’re only installing Python 3, you can use the same command line trick of typing python -v that we used above to check that it is installed correctly and the path variable is set. If you’re installing both versions, however, you need to make the quick tweak found in the following section.

Adjust System Variables So You Can Access Both Python Versions From the Command Line

This section of the tutorial is completely optional, but will allow you to quickly access both versions of Python from the command line. After installing both versions of Python, you may have noticed a little quirk. Even though we enabled the system path for both Python installations, typing “python” at the command prompt only points you to Python 2.7.

The reason for this is simple: the variable (whether automatically adjusted by an installer or manually tweaked) simply points at a directory, and every executable in that directory becomes a command line command. If there are two directories listed and both have a “python.exe” file in them, whichever directory is higher in the list of variables gets used. And, if there is a variable set for the system and the user, the system path takes precedence over the user path.

Easy Install Python Windows 10 2017

The latter is exactly what’s happening in this case: the Python 2 installer edited the system wide variable and the Python 3 installer added a user level variable—and we can confirm this by looking at the Windows’ environment variables.

Hit Start, type “advanced system settings,” and then select the “View advanced system settings” option. In the “System Properties” window that opens, on the “Advanced” tab, click the “Environment Variables” button.

Here, you can see Python 3 listed in the “User variables” section and Python 2 listed in the “System variables” section.

There are a few ways you can remedy this situation. The simplest (albeit the one with the least functionality) is to just remove the entry for the version of Python you plan on using the least. While that’s simple, it’s also not very much fun. Instead we can make another change that will give us access to “python” for Python 2 and “python3” for Python 3.

Easy Install Python Windows 10

To do this, fire up File Manager and head to the folder where you installed Python 3 (C:Users[username]AppDataLocalProgramsPythonPython36 by default). Make a copy of the “python.exe” file, and rename that copy (not the original) to “python3.exe”.

Open a new command prompt (the environmental variables refresh with each new command prompt you open), and type “python3 –version”.

Boom! You can now use the “python” command at the Command Prompt when you want to use Python 2.7 and the “python3” command when you want to use Python 3.

RELATED:How to Edit Your System PATH for Easy Command Line Access in Windows

If, for whatever reason, you don’t find this a satisfactory solution, you can always reorder the environmental variables. Be sure to brush up with our tutorial first if you’re not comfortable editing those variables.

Easy_install Python Windows 10

Please note, however, that regardless of which method you use it is important to leave the original python.exe intact as the applications in the /scripts/ subdirectory for both versions of Python rely on that filename and will fail if it is missing.

After a little installing and a little tweaking, you have both versions installed and you’re ready for whatever Python project you want to tackle.

Easy Install Python Windows 10 Download

READ NEXT

Install Python 3.7 On Windows 10

  • › Windows 10’s Phone Calls Will Support All Android 7+ Phones
  • › What Is Patch Tuesday for Windows, and When Is It?
  • › How to Disable Interactive Pop-Up Ads on Your Roku TV
  • › What’s New in macOS 10.15 Catalina, Available Now
  • › How to Copy and Back Up Files To External Storage on iPhone and iPad