Installations methods include:
Methods differ in ease of use, coverage, maintenance of old versions,system-wide versus local environment use, and control. With pip or Anaconda’sconda, you can control the package versions for a specific project to preventconflicts. Conda also controls non-Python packages, like MKL or HDF5. Systempackage managers, like apt-get
, install across the entire computer, oftenhave older versions, and don’t have as many available versions. Sourcecompilation is much more difficult but is necessary for debugging and development.If you don’t know which installation method you need or prefer, we recommendthe Scientific Python Distribution Anaconda .
So use the following command to install python in your linux system: apt-get install python 3.9; After this, download a good text editor in your system. Such as Sublime text editor, visual text editor, pycharm text editor and as you want; 3. Install and Run Python in Windows. Follow the steps given below and install Python in your Windows. Jul 27, 2020.
Scientific Python Distributions (recommended)¶
Python distributions provide the language itself, along with the most commonlyused packages and tools. These downloadable files require little configuration,work on almost all setups, and provide all the commonly used scientific python tools.
Anaconda works on Windows, Mac, andLinux, provides over 1,500 Python/R packages, and is used by over 15 millionpeople. Anaconda is best suited to beginning users; it provides a largecollection of libraries all in one.
For more advanced users who will need to install or upgrade regularly,Miniconda is a moresuitable way to install the conda package manager.
Other options include:
WinPython: Another free distributionincluding scientific packages and the Spyder IDE; Windows only, but moreactively maintained and supports the latest Python 3 versions.
Pyzo: A free distribution based on Anaconda andthe IEP interactive development environment; Supports Linux, Windows, and Mac.
Installing via pip¶
Python comes with an inbuilt package management system,pip. Pip can install, update, or deleteany official package.
You can install packages via the command line by entering:
We recommend using an user install, sending the --user
flag to pip.pip
installs packages for the local user and does not write to the systemdirectories. Preferably, do not use sudopip
, as this combination can cause problems.
Pip accesses the Python Package Index, PyPI , whichstores almost 200,000 projects and all previous releases of said projects.Because the repository keeps previous versions, you can pin to a version andnot worry about updates causing conflicts. Pip can also install packages inlocal virtualenv, or virtual environment.
Install system-wide via a package manager¶
System package managers can install the most common Python packages.They install packages for the entire computer, often use older versions,and don’t have as many available versions.
Ubuntu and Debian¶
using apt-get:
Fedora 22 and later¶
using dnf:
Mac¶
Mac doesn’t have a preinstalled package manager, but there are a couple ofpopular package managers you can install.
For Python 3.5 with Macports , execute thiscommand in a terminal:
Homebrew has an incomplete coverage of the SciPy ecosystem,but does install these packages:
Source packages¶
You can build any of the packages from source. Those involved in developmentmay take this route to get developmental versions or alter source code.Refer to individual projects for more details.
Binaries¶
Binary files can directly install the packages. These can either come from thedirect source, like GitHub or PyPI ,or third-party repositories. Linux operating systems, like Ubuntu ,have package repositories where you can search for and download individual binaries.For Windows, Christoph Gohlke provides pre-built Windows installersfor many packages.
Whether you use a Mac, Windows, or Linux OS (operating system), you can find and install Python on your computer. The following sections give you instructions for each OS.
How to install Python on Mac OSX
To find and start Python on Mac OSX computers, follow these steps:
Python Step By Step
Press Cmd+spacebar to open Spotlight.
Type the word terminal.
Or, from the Finder, select Finder→Go→Utilities→Terminal.
The Terminal window opens.
In the terminal, type python.
The Python interpreter that’s built in to Mac OSX opens.
How to install Python on Windows
Unfortunately, Python doesn’t come on Windows. If you’re running Windows, then you need to download and install Python by following the instructions here. Installing Python on Windows isn’t difficult. If you can download a file from a website, you have the skills to install Python.
Fortunately, the Python Foundation (the peeps who guide the development of Python) makes installable files available from its website.
Firefox and Internet Explorer responded differently to the Python download website, so the instructions are based on which of these browsers you use. If you use a whole other browser altogether, try the Internet Explorer instructions.
Installing with Firefox
To install Python on a Windows machine with Firefox, follow these steps:
Visit www.python.org/downloads.
Click the button that says Download Python 2.7.9.
Or, if it’s there, click a more recent version number that starts with 2.7.
Clicking this button automatically downloads and saves an msi file for you. If not, try the instructions for Internet Explorer. See Figure 1.
Figure 1: Download Python with Firefox.” width=”535″/>When the download’s complete, click the icon for Firefox’s download tool.
Click the file called python-2.7.9.msi (or the more recent version, if you downloaded one).
Python 2.7.9 installs on your computer.
Installing with Internet Explorer
To install Python on a Windows machine with Internet Explorer, follow these steps:
Visit www.python.org/downloads.
From the menu bar, select Downloads→Windows.
You can see the menu options in Figure 2.
Figure 2: Download Python with Internet Explorer.” width=”535″/>Scroll down to the heading Python 2.7.9-2014-12-10.
Or scroll to a more recent version, which starts with Python 2.7, if one is available.
Under this heading, click the link titled Download Windows x86 MSI Installer.
See Figure 3. This is a link for a 32-bit installation, which makes things work better with third-party libraries. Use the 32-bit installer even if you have a 64-bit machine and even if you have no idea what this paragraph is talking about.
Figure 3: Python x86 MSI Installer.” width=”535″/>
Python Step By Step Tutorial
If you’re asked to choose whether to run or save the file, choose Run.
This downloads python2.7.9.msi and starts running the installer.
If you get a security warning when the installer begins (or at random times during the installation), choose Run.
Accept the default installation options that the installer provides.
How to install Python for Linux
Steps To Download Python Macro
If you’re running Linux, confirm that you have version 2.7.9 of Python installed, rather than version 3. This shouldn’t be a problem because Python 2.7 is installed by default in recent versions of OpenSuSE, Ubuntu, and Red Hat Fedora.
Install Python On Mac
In the nutty odd case when someone has Python 3 but not Python 2.7, read your distribution’s documentation for how to use the package manager and get Python 2.7 and IDLE.