python install before vscode
This commit is contained in:
110
docs/day0.md
110
docs/day0.md
@@ -1,14 +1,36 @@
|
|||||||
# Day 0
|
# Day 0
|
||||||
|
|
||||||
"You wouldn't learn to carve wood with your fingernails."
|
|
||||||
|
|
||||||
\- me
|
|
||||||
|
|
||||||
When you start programming half the battle is getting your bearings. Suddenly it matters where you put your files. You need to know where you home directory is, you need to understand file permissions, you need to understand what a file actually *is*. Trying to program without first learning about *the thing you are programming* will cause headache.
|
When you start programming half the battle is getting your bearings. Suddenly it matters where you put your files. You need to know where you home directory is, you need to understand file permissions, you need to understand what a file actually *is*. Trying to program without first learning about *the thing you are programming* will cause headache.
|
||||||
|
|
||||||
Fortunately we can do some things to make your life easier. We can install an IDE: a program that lets you visualize your files and folders and quickly switch between them. We can install a version control system that will let you "snapshot" your code and save it to the cloud so you never lose it. We can organize our project to be repeatable, and more importantly, unloseable.
|
Fortunately we can do some things to make your life easier. We can install an IDE: a program that lets you visualize your files and folders and quickly switch between them. We can install a version control system that will let you "snapshot" your code and save it to the cloud so you never lose it. We can organize our project to be repeatable, and more importantly, unloseable.
|
||||||
|
|
||||||
## Install VSCode
|
## I have a Windows PC (or skip to [I have a Mac](#i-have-a-mac))
|
||||||
|
|
||||||
|
### Install Git
|
||||||
|
|
||||||
|
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and
|
||||||
|
|
||||||
|
1. Head to <https://git-scm.com/>
|
||||||
|
|
||||||
|
2. Click Download
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. Run through the default install process
|
||||||
|
|
||||||
|
### Install Python
|
||||||
|
|
||||||
|
1. Head to <https://www.python.org/>
|
||||||
|
|
||||||
|
2. Hover over Downloads and click the most recent version
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. Run through the install process - uncheck "install for all users" and check "add python 3.9 to path"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Install VSCode
|
||||||
|
|
||||||
Your most important tool as a programmer is a proper editor. It should offer you a wide selection of tools but get out of your way when you don't need it. VSCode is a great option in 2020. It has tons of extensions and support for almost every language you can throw at it.
|
Your most important tool as a programmer is a proper editor. It should offer you a wide selection of tools but get out of your way when you don't need it. VSCode is a great option in 2020. It has tons of extensions and support for almost every language you can throw at it.
|
||||||
|
|
||||||
@@ -32,32 +54,6 @@ Your most important tool as a programmer is a proper editor. It should offer you
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Install Git
|
|
||||||
|
|
||||||
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and
|
|
||||||
|
|
||||||
1. Head to <https://git-scm.com/>
|
|
||||||
|
|
||||||
2. Click Download
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Run through the default install process
|
|
||||||
|
|
||||||
## I have a Windows PC (or skip to [I have a Mac](#i-have-a-mac))
|
|
||||||
|
|
||||||
### Install Python
|
|
||||||
|
|
||||||
1. Head to <https://www.python.org/>
|
|
||||||
|
|
||||||
2. Hover over Downloads and click the most recent version
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Run through the install process - uncheck "install for all users" and check "add python 3.9 to path"
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Create a "Projects" folder
|
### Create a "Projects" folder
|
||||||
|
|
||||||
I keep all my projects in a folder called "Projects" in my home directory. On Windows this is at `C:\Users\username\Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
|
I keep all my projects in a folder called "Projects" in my home directory. On Windows this is at `C:\Users\username\Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
|
||||||
@@ -120,6 +116,18 @@ Django is a pip package. Pip packages are other people's python code that you ca
|
|||||||
|
|
||||||
## I have a Mac
|
## I have a Mac
|
||||||
|
|
||||||
|
### Install Git
|
||||||
|
|
||||||
|
Git is a version control program, but you can think of it as your best friend in the cold, dark world of data loss. Git will make sure you don't lose progress. It lets you save your code at various stages and
|
||||||
|
|
||||||
|
1. Head to <https://git-scm.com/>
|
||||||
|
|
||||||
|
2. Click Download
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. Run through the default install process
|
||||||
|
|
||||||
### Install Python
|
### Install Python
|
||||||
|
|
||||||
1. Head to <https://www.python.org/>
|
1. Head to <https://www.python.org/>
|
||||||
@@ -132,13 +140,37 @@ Django is a pip package. Pip packages are other people's python code that you ca
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Install VSCode
|
||||||
|
|
||||||
|
Your most important tool as a programmer is a proper editor. It should offer you a wide selection of tools but get out of your way when you don't need it. VSCode is a great option in 2020. It has tons of extensions and support for almost every language you can throw at it.
|
||||||
|
|
||||||
|
1. Head to <https://code.visualstudio.com/>
|
||||||
|
|
||||||
|
2. Click on the download link
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. Run through the installer, select default options
|
||||||
|
|
||||||
|
4. Open VSCode
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
5. Uncheck "Show welcome page on startup"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
6. Close out of the welcome page
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Create a "Projects" folder
|
### Create a "Projects" folder
|
||||||
|
|
||||||
I keep all my projects in a folder called "Projects" in my home directory. On MacOS this is at `/Users/username/Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
|
I keep all my projects in a folder called "Projects" in my home directory. On MacOS this is at `/Users/username/Projects`. Create this folder now. Bookmark it, put it in your favorites, don't lose it.
|
||||||
|
|
||||||
1. In your `Projects` folder create another folder called `my_website`
|
1. In your `Projects` folder create another folder called `my_website`
|
||||||
|
|
||||||
2. Switch to VSCode You can use <kbd>cmd</kbd>+<kbd>tab</kbd> to quickly switch between windows. Press <kbd>ctrl</kbd>+<kbd>o</kbd> and select the projects/my_website folder
|
1. Switch to VSCode You can use <kbd>cmd</kbd>+<kbd>tab</kbd> to quickly switch between windows. Press <kbd>ctrl</kbd>+<kbd>o</kbd> and select the projects/my_website folder
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -150,20 +182,22 @@ A python virtual environment is a folder that will hold your python installation
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
2. Type `python3 --version`
|
1. Type `python3 --version`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
3. If you see `Python 3.9.#` you have the correct version, if you see another version try typing `python3.9 --version`. If that doesn't work you'll need to reinstall python 3.9.
|
1. If you see `Python 3.9.#` you have the correct version, if you see another version try typing `python3.9 --version`. If that doesn't work you'll need to reinstall python 3.9.
|
||||||
|
|
||||||
4. Type `python3 -m venv venv`. You'll see a folder appear on the right side of VSCode.
|
1. Type `python3 -m venv venv`. You'll see a folder appear on the right side of VSCode.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
5. Source your venv: type `source venv/bin/activate`. You'll see a (venv) appear next to your terminal cursor.
|
1. Source your venv: type `source venv/bin/activate`. You'll see a (venv) appear next to your terminal cursor.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
1. Stop running server by clicking in the terminal and typing <kbd>ctrl<kbd>+<kbd>C</kbd>
|
||||||
|
|
||||||
### Install Django
|
### Install Django
|
||||||
|
|
||||||
Django is a pip package. Pip packages are other people's python code that you can download for free. In much the same way you downloaded VSCode and Python itself with your browser, we can download pip packages with "pip". Pip comes preinstalled with Python.
|
Django is a pip package. Pip packages are other people's python code that you can download for free. In much the same way you downloaded VSCode and Python itself with your browser, we can download pip packages with "pip". Pip comes preinstalled with Python.
|
||||||
@@ -190,4 +224,6 @@ Django is a pip package. Pip packages are other people's python code that you ca
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
1. You should see an install success page. If so, congratulations! You have successfully installed Django.
|
1. You should see an install success page. If so, congratulations! You have successfully installed Django.
|
||||||
|
|
||||||
|
1. Stop running server by clicking in the terminal and typing <kbd>ctrl<kbd>+<kbd>C</kbd>
|
||||||
Reference in New Issue
Block a user