|
1 | | -# Python & Django installation |
| 1 | +# Django installation |
2 | 2 |
|
3 | 3 | *This chapter is based on awesome tutorials by Geek Girls Carrots (http://django.carrots.pl/) and django-marcador (http://django-marcador.keimlink.de/).* |
4 | 4 |
|
5 | | -## Python Installation |
| 5 | +## Virtual environment |
6 | 6 |
|
7 | | -Django is written in Python. We need it to do anything in Django. Let's start with installing it! |
| 7 | +Before we will install Django, we will make you install something very handy and useful, that will help you with keeping everything tidy on your computer. It is possible to skip this step, but we think, that you should start with the best setup possible to save a lot of troubles in a future. |
8 | 8 |
|
9 | | -### Windows |
10 | | - |
11 | | -You can download Python for Windows from website https://www.python.org/download/releases/3.4.0/. After downloading ***.msi** file, you should execute it (double-click on it) and follow the instructions there. It is important to remember the path (the folder) where we installed the Python. It will be needed later. |
12 | | - |
13 | | -### Linux |
| 9 | +That's why we want you to create a Virtual environment (also called `virtualenv`). It will isolate things you do from your computer, so you will have everything important in one place. Neat, right? |
14 | 10 |
|
15 | | -It is very probable, that you already have Python installed out of the box. To check if you have it installed (and which version it is), you type in a console: |
| 11 | +All you need to do is find a folder in which you want to create the `virtualenv`, for example your home directory. In Windows it could look like: `C:\Users\Ala\` (where Ala is the name of the user). |
16 | 12 |
|
17 | | - $ python --version |
18 | | - Python 3.4.0 |
| 13 | +### Windows |
19 | 14 |
|
20 | | -If you don't have Python instaled or you want different version, you can install it as follows. |
| 15 | +To create `virtualenv` you need to open command line `cmd` and type there `C:\Python\python -m venv blog`. It will look like this: |
21 | 16 |
|
22 | | -#### Ubuntu |
| 17 | + C:\Users\Ala> C:\Python34\python -m venv blog |
23 | 18 |
|
24 | | -You type in the console: |
| 19 | +where `C:\Python34\python` is folder in which you previously installed Python and `blog` is a name of your `virtualenv`. You can use any other name, but stick to lowercase and use no spaces. It is also good idea to keep the name short :). |
25 | 20 |
|
26 | | - sudo apt-get install python3.4 |
| 21 | +### Linux |
27 | 22 |
|
| 23 | +### OS X |
28 | 24 |
|
29 | | -#### Fedora |
30 | 25 |
|
31 | | -Yout type in the console: |
32 | 26 |
|
33 | | - sudo yum install python3.4 |
34 | 27 |
|
35 | | -### OS X |
36 | 28 |
|
37 | | -You need to go to the website https://www.python.org/download/releases/3.4.0/ and install the appropriate package for you operating system. |
38 | 29 |
|
39 | | ----- |
40 | 30 |
|
41 | | -If you have any doubts or something went wrong and you have no idea what to do next - please ask your coach! Sometimes things are not going smoothly and it's better to ask for help someone with more experience. |
0 commit comments