Skip to content

Commit e49dfb2

Browse files
committed
updating the installing and running instructions
1 parent ae3333c commit e49dfb2

File tree

1 file changed

+38
-69
lines changed

1 file changed

+38
-69
lines changed

basics/installing-python.md

Lines changed: 38 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ need to try out the code examples. You can use a website like
66
installing Python. That way you don't need to open a web browser just
77
to write code, and you can work without an Internet connection.
88

9+
It doesn't matter which operating system you use because Python runs
10+
great on Windows, Mac OSX, Linux and many other operating systems.
11+
However, installing and launching Python are done differently on
12+
different operating systems, so just follow your operating system's
13+
instructions.
14+
915
Let's get started!
1016

1117
## Downloading and installing Python
@@ -16,92 +22,55 @@ Use the official Python installer, it will install Python and IDLE for
1622
you.
1723

1824
1. Go to [the official Python website](https://www.python.org/).
19-
2. Move your mouse over the blue Downloads button, but don't click it,
20-
Then click the button that downloads the latest version of Python.
25+
2. Move your mouse over the blue Downloads button, but don't click it.
26+
Then click the button that downloads the latest version of Python.
2127
3. Run the installer.
22-
4. Install Python like any other program. Make sure the py.exe
23-
launcher gets installed.
28+
4. Make sure that the launcher gets installed and click Install Now.
2429

25-
### Mac OSX
30+
![The py.exe launcher.](../images/py-exe.png)
2631

27-
I don't have an up-to-date copy of Mac OSX. If you would like to write
28-
instructions for OSX, [tell me](../contact-me.md).
32+
### Mac OSX
2933

30-
### GNU/Linux
34+
At the time of writing this, Macs don't come with a Python 3 and you
35+
need to install it yourself. It should be like installing any other
36+
program, but unfortunately I don't have better instructions because I
37+
don't have an up-to-date Mac and I have never installed Python on a Mac.
38+
If you would like to write better instructions, [tell
39+
me](../contact-me.md).
3140

32-
You already have Python, there's no need to download anything.
41+
### Linux
3342

34-
If you want to use IDLE (see below), install it. The name of the
35-
package is `idle3` on Debian-based distributions, like Ubuntu and Linux
36-
Mint, and you can install it with a software manager like any other
37-
program. On other distributions you can just search for idle using the
38-
distribution's package manager.
43+
You already have Python 3, **there's no need to install anything**. You
44+
may also have Python 2, but don't try to remove it. Some of your
45+
programs are probably written in Python 2, so removing Python 2 would
46+
break them.
3947

4048
## Running Python
4149

42-
Now you have Python installed. There are several ways to run Python:
43-
44-
1. Directly from PowerShell, command prompt or terminal.
45-
2. Using IDLE.
46-
3. Using something else.
47-
48-
I'm not going to focus on the third option in this tutorial, but if you
49-
know how to use Python with something else than PowerShell, command
50-
prompt, a terminal or IDLE it's fine. Do whatever you want.
51-
52-
### If you are not an advanced user and you have no idea what PowerShell, command prompt and terminal are
50+
Next we'll learn to run Python on a PowerShell or terminal. There are
51+
several other ways to run Python, but if you learn this way now it's
52+
going to make things easier later.
5353

54-
Use IDLE. Experienced Python users will say that IDLE is garbage, but
55-
don't listen to them. These people want you to use "better"
56-
alternatives with more features, but that's exactly what you don't want
57-
as a beginner. You should spend as little time as possible learning
58-
your tools, and as much time as possible learning Python. Advanced
59-
programming tools are not going to help you with this at all.
60-
61-
Launch Python's IDLE like any other program. You should see something
62-
like this:
63-
64-
![IDLE](../images/idle.png)
65-
66-
From now on, I'll instead show everything like this, so I don't have to
67-
take more screenshots:
68-
69-
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
70-
[GCC 4.8.4] on linux
71-
Type "copyright", "credits" or "license()" for more information.
72-
>>>
73-
74-
The exact content of your Python's welcome message is probably different
75-
than mine, it's ok.
54+
### Windows
7655

77-
### If you like working with PowerShell, command prompt or terminal
56+
1. Open a PowerShell from your start menu or start screen.
57+
2. Type `py` and press Enter. You should see something like this:
7858

79-
On Windows. you should be able to run Python from a PowerShell window,
80-
or a command prompt window if you don't have PowerShell. Open one of
81-
these programs from the start menu or start screen, type there `py` and
82-
press Enter. You should see something like this in it:
59+
![Python running in a PowerShell window.](../images/powershell.png)
8360

84-
C:\Users\You> py
85-
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18)
86-
[MSC v.1600 32 bit (Intel)] on win32
87-
Type "help", "copyright", "credits" or "license" for more information.
88-
>>>
61+
### Other operating systems
8962

90-
On GNU/Linux or Mac OSX, you should have a terminal application installed
91-
already. Run it and type `python3`:
63+
1. Open a terminal. How exactly this is done depends on your operating
64+
system, but most operating systems have some way to search for
65+
programs. Search for a program called terminal and launch it.
66+
2. Type `python3` and press Enter. You should see something like this:
9267

93-
you@YourComputer:~$ python3
94-
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
95-
[GCC 4.8.4] on linux
96-
Type "help", "copyright", "credits" or "license" for more information.
97-
>>>
68+
![Running Python on my terminal.](../images/terminal.png)
9869

99-
Now you can type `exit()` and press Enter to get out of Python.
70+
Your terminal probably looks different than mine, it's OK.
10071

101-
You may also have an older version of Python installed, but don't remove
102-
it. Your system may need it, so if you replace it with your own Python
103-
some things might stop working. See
104-
[this](https://docs.python.org/3/faq/installed.html) for more info.
72+
Now you can type `exit()` and press Enter to get out of Python. Or you
73+
can just close the PowerShell or Terminal window.
10574

10675
## Summary
10776

0 commit comments

Comments
 (0)