1/8/2021 Python Setup Download
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?
Installing Packages¶. This section covers the basics of how to install Python packages. It’s important to note that the term “package” in this context is being used as a synonym for a distribution (i.e. A bundle of software to be installed), not to refer to the kind of package that you import in your Python source code (i.e. A container of modules). Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report. How to Download Python for Windows 10. To install python, you have to download the latest version of python from the Python official website. This gives the latest version of Python to download on your Windows operating system. See the screen below giving you a button with text “Download Python 3.7.0“. Click this button to download the latest version of Python on your Windows.
In this video I an going to show How to Download and Install Python 3.6 on Windows 10. Setting up your Windows 10 System for Python is relatively easy. We Just need to follow some important steps. To download the setup file for python 3.6, go to python’s official website and click on Python 3.6.4 under Downloads in the menu bar. Or, you can directly click on the link below to download the setup file.
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
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.
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.
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.
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.
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.
READ NEXT
Active15 days ago
pip is a replacement for easy_install . But should I install pip using easy_install on Windows? Is there a better way?
36 Answers
12 next
Python 2.7.9+ and 3.4+
Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded from using community libraries by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Node.js, Haskell, Perl, Go—almost every other contemporary language with a majority open-source community. Thank you Python.
Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this in Stack Overflow question Does Python have a package/module management system?.
And, alas for everyone using Python 2.7.8 or earlier (a sizable portion of the community). There's no plan to ship Pip to you. Manual instructions follow.
Python 2 ≤ 2.7.8 and Python 3 ≤ 3.3
Flying in the face of its 'batteries included' motto, Python ships without a package manager. To make matters worse, Pip was—until recently—ironically difficult to install.
Official instructions
Per https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip:
Download
get-pip.py , being careful to save it as a .py file rather than .txt . Then, run it from the command prompt:
You possibly need an administrator command prompt to do this. Follow Start a Command Prompt as an Administrator (Microsoft TechNet).
This installs the pip package, which (in Windows) contains ..Scriptspip.exe that path must be in PATH environment variable to use pip from the command line (see the second part of 'Alternative Instructions' for adding it to your PATH,
Alternative instructions
https://treetraveler562.weebly.com/motorola-razr-driver.html. The official documentation tells users to install Pip and each of its dependencies from source. That's tedious for the experienced and prohibitively difficult for newbies.
For our sake, Christoph Gohlke prepares Windows installers (
.msi ) for popular Python packages. He builds installers for all Python versions, both 32 and 64 bit. You need to:
For me, this installed Pip at
C:Python27Scriptspip.exe . Find pip.exe on your computer, then add its folder (for example, C:Python27Scripts ) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:
There you go (hopefully)! Solutions for common problems are given below:
Proxy problems
If you work in an office, you might be behind an HTTP proxy. If so, set the environment variables
http_proxy and https_proxy . Most Python applications (and other free software) respect these. Example syntax:
If you're really unlucky, your proxy might be a Microsoft NTLM proxy. Free software can't cope. The only solution is to install a free software friendly proxy that forwards to the nasty proxy. http://cntlm.sourceforge.net/
Unable to find vcvarsall.bat
Python modules can be partly written in C or C++. Pip tries to compile from source. If you don't have a C/C++ compiler installed and configured, you'll see this cryptic error message.
Error: Unable to find vcvarsall.bat
You can fix that by installing a C++ compiler such as MinGW or Visual C++. Microsoft actually ships one specifically for use with Python. Or try Microsoft Visual C++ Compiler for Python 2.7.
Often though it's easier to check Christoph's site for your package.
Baum mit Augen♦
42.5k1212 gold badges122122 silver badges157157 bronze badges
Colonel PanicColonel Panic
86.7k6565 gold badges317317 silver badges403403 bronze badges
-- Outdated #2 -- use setuptools as distribute is deprecated.
As you mentioned pip doesn't include an independent installer, but you can install it with its predecessor easy_install.
So:
You are done.
Now you can use danio
pip install package to easily install packages as in Linux :)
5,42844 gold badges3434 silver badges5252 bronze badges
Adrián DeccicoAdrián Deccico
4,64222 gold badges1717 silver badges2828 bronze badges
2014 UPDATE:
1) If you have installed Python 3.4 or later, pip is included with Python and should already be working on your system.
2) If you are running a version below Python 3.4 or if pip was not installed with Python 3.4 for some reason, then you'd probably use pip's official installation script
get-pip.py . The pip installer now grabs setuptools for you, and works regardless of architecture (32-bit or 64-bit).
The installation instructions are detailed here and involve:
To install or upgrade pip, securely download get-pip.py.
Then run the following (which may require administrator access): Kirby nightmare in dreamland games.
To upgrade an existing setuptools (or distribute), run
pip install -U setuptools
I'll leave the two sets of old instructions below for posterity.
OLD Answers:
For Windows editions of the 64 bit variety - 64-bit Windows + Python used to require a separate installation method due to ez_setup, but I've tested the new distribute method on 64-bit Windows running 32-bit Python and 64-bit Python, and you can now use the same method for all versions of Windows/Python 2.7X:
OLD Method 2 using distribute:
The last step will not work unless you're either in the directory
easy_install.exe is located in (C:Python27Scripts would be the default for Python 2.7), or you have that directory added to your path.
OLD Method 1 using ez_setup:
from the setuptools page --
Download ez_setup.py and run it; it will download the appropriate .egg file and install it for you. (Currently, the provided .exe installer does not support 64-bit versions of Python for Windows, due to a distutils installer compatibility issue.
After this, you may continue with:
Community♦
AndrewPKAndrewPK
4,62822 gold badges2121 silver badges3333 bronze badges
2016+ Update:
These answers are outdated or otherwise wordy and difficult.
If you've got Python 3.4+ or 2.7.9+, it will be installed by default on Windows. Otherwise, in short:
The new binaries Gringo SuaveGringo Suave
pip.exe (and the deprecated easy_install.exe ) will be found in the '%ProgramFiles%PythonXXScripts' folder (or similar), which is often not in your PATH variable. I recommend adding it.
19.8k55 gold badges7070 silver badges6161 bronze badges
Python 3.4, which was released in March 2014, comes with matthmatth
pip included:http://docs.python.org/3.4/whatsnew/3.4.html So since the release of Python 3.4, the up-to-date way to install pip on Windows is to just install Python.When sticking to all defaults during installation, pip will be installed to C:Python34Scriptspip3.exe .
1,35611 gold badge1212 silver badges3535 bronze badges
When I have to use Windows, I use ActivePython, which automatically adds everything to your PATH and includes a package manager called PyPM which provides binary package management making it faster and simpler to install packages.
pip and easy_install aren't exactly the same thing, so there are some things you can get through pip but not easy_install and vice versa.
My recommendation is that you get ActivePython Community Edition and don't worry about the huge hassle of getting everything set up for Python on Windows. Then, you can just use
pypm .
In case you want to use
pip you have to check the PyPM option in the ActiveState installer. After installation you only need to logoff and log on again, and pip will be available on the commandline, because it is contained in the ActiveState installer PyPM option and the paths have been set by the installer for you already. PyPM will also be available, but you do not have to use it.
Community♦
Rafe KettlerRafe Kettler
59.2k1717 gold badges138138 silver badges143143 bronze badges
The up-to-date way is to use Windows' package manager Chocolatey.
Once this is installed, all you have to do is open a command prompt and run the following the three commands below, which will install Python 2.7, easy_install and pip. It will automatically detect whether you're on x64 or x86 Windows.
All of the other Python packages on the Chocolatey Gallery can be found here.
Martin RedolaMartin Redola
Update March 2015
Python 2.7.9 and later (on the Python 2 series), and Python 3.4 and later include pip by default, so you may have pip already.
If you don't, run this one line command on your prompt (which may require administrator access):
It will install pip. If Setuptools is not already installed,
get-pip.py will install it for you too.
As mentioned in comments, the above command will download code from the Pip source code repository at GitHub, and dynamically run it at your environment. So be noticed that this is a shortcut of the steps download, inspect and run, all with a single command using Python itself. If you trust Pip, proceed without doubt.
Be sure that your Windows environment variable PATH includes Python's folders (for Python 2.7.x default install: Peter Mortensen
C:Python27 and C:Python27Scripts , for Python 3.3x: C:Python33 and C:Python33Scripts , and so on).
14.5k1919 gold badges8989 silver badges118118 bronze badges
Fernando MacedoFernando Macedo
Installers
I've built Windows installers for both distribute and pip here (the goal being to use
pip without having to either bootstrap with easy_install or save and run Python scripts):
On Windows, simply download and install first
distribute , then pip from the above links. The distribute link above does contain stub .exe installers, and these are currently 32-bit only. I haven't tested the effect on 64-bit Windows.
Building on Windows
The process to redo this for new versions is not difficult, and I've included it here for reference.
Building
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2021
Categories |