#100DaysOfCode in Python Transcripts
Chapter: Welcome to the course
Lecture: Bob's setup

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I'm using Anaconda for this course,
0:02 a pre-bundled, Python distribution widely used
0:06 in the Data Science community.
0:08 And it comes with a lot of packages already.
0:10 You're not required to use this distribution.
0:14 You can also pip install my requirements,
0:16 which we will see in a bit.
0:17 You can download the full version here.
0:19 We recommend that you use 3.6.
0:22 Really no reason to start a new project in Python 2 anymore.
0:26 You can also install Miniconda, which is a smaller version,
0:30 which only includes the base packages.
0:33 And, mainly, what you need to know is
0:36 for almost all the lessons, I will be using
0:39 Jupyter Notebooks, which is a great way to experiment
0:42 with Python code and more in the browser.
0:45 It's a great tool to both teach and learn Python.
0:49 You can try it out if you want to play a little bit
0:52 at this point by going to try.jupyter.org,
0:55 but I encourage you to install it
0:57 to follow along with my lessons.
0:59 To install it, again, the recommended way is
1:02 to use Anaconda, but you can also use pip install jupyter,
1:07 and that should get it as well.
1:08 And let me show you that quickly.
1:10 So, first I need to clone the 100 Days of Code repo.
1:14 You cd into that.
1:15 At this point you really want to make
1:17 your virtual environment to work
1:19 on the project's requirement in isolation
1:22 to not mess up your global space.
1:24 And in every lesson, I have a video how to pip install
1:27 the requirements for that lesson, but I also
1:29 have 'em all wrapped together in a requirements file.
1:35 So, for all the notebooks, you need Jupyter;
1:37 and ipykernel, which I will explain why in a bit;
1:41 and then I listed out the requirements for each lesson.
1:44 There are various ways to make a virtual environment.
1:47 The classic way is to use pyvenv built in module.
1:51 You can also use pipenv, the new way,
1:54 which should be perfectly fine.
1:57 And Anaconda comes with Conda,
1:59 a utility to manage environments as well.
2:03 However, I am used to virtualenv, just the classic one.
2:06 So, in this course I am making a virtual environment
2:09 with this alias:
2:10 virtualenv -p, pointing to the Python binary
2:13 that comes with my Anaconda installation,
2:16 and the name of my virtual environment.
2:17 So, let's run that now.
2:20 And then you have to activate it.
2:21 And that's what I'm doing, that a lot I have another alias,
2:25 ae, and now I'm in my virtual environment,
2:29 where I don't have anything installed.
2:31 At this point, you can just do it video by video,
2:34 but if you want to have all the packages up-front,
2:36 you can do pip install -r,
2:38 requirements/requirements,
2:41 and that might take a bit because
2:43 it's not only pulling the dependencies,
2:45 but some of the dependencies have other dependencies.
2:48 With that done, you can launch a Jupyter notebook like this.
2:56 And you can go in today's and do any lesson.
3:00 For example, Selenium.
3:02 And you can open the notebook like this,
3:07 and you can follow the lesson.
3:11 And you see that the notebook discovered
3:13 my virtual environment.
3:15 If that is not the case, you might have to tweak it
3:18 a little bit, and that's why I pip install ipykernel
3:22 and Tornado was pulled in as well.
3:24 That should have been enough.
3:25 If that's not the case, you might have to run
3:28 ipythonkernel install <username> <projectname>
3:32 And this will be venv, or the name
3:34 of the virtual environment.
3:35 And then back to the notebook.
3:37 You should have the kernel, venv,
3:39 or whatever you named the virtual environment, here,
3:41 and you can switch to that, but I already have it here.
3:44 So, then your dependency should work.
3:46 It's in your virtual environment and you can follow along
3:49 with the lesson and make any modifications in the code
3:52 and experiment and that's how you learn.