Skip to content

Commit

Permalink
pip install -r instead of pip freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayof committed Jul 11, 2018
1 parent e7efa9a commit 49705de
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions en/django_installation/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,29 @@ Before we do that, we should make sure we have the latest version of `pip`, the
A requirements file keep a list of dependencies to be installed using
`pip install`:
First, run `pip install django~=2.0.6` to install Django.
First create a `requirements.txt` file inside of `djangogirls/` folder:
```
djangogirls
└───requirements.txt
```
In your `djangogirls/requirements.txt` file you should add the following text:
{% filename %}djangogirls/requirements.txt{% endfilename %}
```
Django==2.0.6
```
Now, run ``pip install -r requirements.txt`` to install Django.
{% filename %}command-line{% endfilename %}
```
(myvenv) ~$ pip install django~=2.0.6
Collecting django
Downloading Django-2.0.6-py2.py3-none-any.whl (6.8MB)
Installing collected packages: django
Successfully installed django-2.0.6
(myvenv) ~$ pip install -r requirements.txt
Collecting Django==2.0.6 (from -r requirements.txt (line 1))
Downloading Django-2.0.6-py3-none-any.whl (7.1MB)
Installing collected packages: Django
Successfully installed Django-2.0.6
```
<!--sec data-title="Installing Django: Windows" data-id="django_err_windows"
Expand All @@ -197,7 +211,7 @@ data-collapse=true ces-->
>
>{% filename %}command-line{% endfilename %}
>```
>C:\Users\Name\djangogirls> python -m pip install django~=2.0.6
>C:\Users\Name\djangogirls> python -m pip install -r requirements.txt
>```
<!--endsec-->
Expand All @@ -209,15 +223,4 @@ data-collapse=true ces-->
<!--endsec-->
Let's create a `requirements.txt`, run `pip freeze > requirements.txt` to save `django~=2.0.6` as a dependency of the project.
The `requirements.txt` should be inside of `blog/`:
```
blog
└───requirements.txt
```
That's it! You're now (finally) ready to create a Django application!

0 comments on commit 49705de

Please sign in to comment.