1
00:00:01,180 --> 00:00:01,930
Hey, guys.

2
00:00:02,170 --> 00:00:07,600
In this lecture, I'm going to show you how to set up your development environment so that you can follow

3
00:00:07,600 --> 00:00:08,680
along in these courses.

4
00:00:10,780 --> 00:00:13,150
First, let's talk about operating systems.

5
00:00:13,990 --> 00:00:16,870
The three big ones are Windows, Linux and Mac.

6
00:00:17,740 --> 00:00:21,430
Most, but not all, of my courses are part of the deep learning series.

7
00:00:21,970 --> 00:00:28,240
Eventually, the deep learning models were going to build will become so complex that we will need specialized

8
00:00:28,240 --> 00:00:31,630
libraries like Ciano and TensorFlow to implement them.

9
00:00:32,439 --> 00:00:37,480
Now, as of today, piano and TensorFlow are not officially supported on windows.

10
00:00:38,440 --> 00:00:43,660
So if you are interested in deep learning, you will discover pretty soon that there is not much you

11
00:00:43,660 --> 00:00:50,600
can do without a ton of work, even working with non GPU enabled libraries like Nampai and Mat Plot.

12
00:00:50,620 --> 00:00:57,160
Lib can be a challenge, but these are at least possible on windows if you really must use windows and

13
00:00:57,160 --> 00:01:02,350
have your Python environment inside windows and you don't want to try the virtual machine method, which

14
00:01:02,350 --> 00:01:03,760
I'm going to discuss next.

15
00:01:04,239 --> 00:01:07,360
Then one good library I know of is called Anaconda.

16
00:01:08,530 --> 00:01:13,180
You can get Anaconda at Continuum i o slash downloads.

17
00:01:14,230 --> 00:01:20,110
I can't vouch for this 100 percent because I haven't used it myself, but I've known others who have

18
00:01:20,110 --> 00:01:21,400
found it at least usable.

19
00:01:22,300 --> 00:01:24,040
Now I'm telling you this from experience.

20
00:01:24,490 --> 00:01:30,130
I've worked with a ton of clients, one on one and python development, especially when it involves

21
00:01:30,130 --> 00:01:33,730
the Nampai side stack is not easy when it's on windows.

22
00:01:34,480 --> 00:01:39,730
The method I'm going to describe using virtual machines will work on most modern computers.

23
00:01:39,730 --> 00:01:46,180
And as of right now, if you want to do any deep learning stuff, whether that be with piano or TensorFlow,

24
00:01:46,540 --> 00:01:48,010
you cannot do this on windows.

25
00:01:48,460 --> 00:01:54,700
With that out of the way, I'm going to quickly go over which courses I've released so far or plan to

26
00:01:54,700 --> 00:01:58,630
release in the near future that do not require Phyno and TensorFlow.

27
00:01:58,960 --> 00:02:00,880
So it's possible to do on Windows.

28
00:02:01,840 --> 00:02:06,310
With this in mind, you can decide if you want to install a virtual machine or not.

29
00:02:06,640 --> 00:02:11,590
But I would highly recommend it because it's free and everyone can follow the same instructions.

30
00:02:12,740 --> 00:02:19,070
So we've got linear regression in Python logistic regression in Python, which are the prerequisites

31
00:02:19,070 --> 00:02:20,450
to deep learning part one.

32
00:02:21,410 --> 00:02:26,660
And we have deep learning in Python, part one, which is mostly in Nampai and a little bit of TensorFlow.

33
00:02:27,530 --> 00:02:32,300
We've got easy natural language processing in Python data analytics.

34
00:02:32,720 --> 00:02:38,750
Ask you all for newbies, beginners and marketers, cluster analysis and unsupervised machine learning

35
00:02:38,750 --> 00:02:41,990
in Python and unsupervised machine learning.

36
00:02:42,300 --> 00:02:44,180
Hidden Markov models in Python.

37
00:02:44,660 --> 00:02:46,790
This course is going to have a little bit of piano in it.

38
00:02:47,150 --> 00:02:52,520
Next, here are some courses that depend heavily upon piano or TensorFlow or both.

39
00:02:53,900 --> 00:02:59,870
We've got practical deep learning and piano and TensorFlow convolutional neural networks and Python

40
00:03:00,380 --> 00:03:06,560
unsupervised deep learning in Python and recurrent neural networks in Python, as you can see, a lot

41
00:03:06,560 --> 00:03:10,280
of interesting and complex stuff can be done in piano and TensorFlow.

42
00:03:11,300 --> 00:03:11,780
All right.

43
00:03:11,780 --> 00:03:15,590
So hopefully I've convinced you that using a virtual machine is a good idea.

44
00:03:16,310 --> 00:03:22,520
Windows is a great operating system, but it tends to not be as developer friendly since it tries to

45
00:03:22,520 --> 00:03:23,780
be more consumer friendly.

46
00:03:24,410 --> 00:03:27,410
Note that if you're on a Mac, this probably isn't necessary.

47
00:03:27,800 --> 00:03:34,790
You can just install Nampai say by Panda's Matt Plot, Lib Piano and TensorFlow using easy installer

48
00:03:34,790 --> 00:03:35,120
pip.

49
00:03:36,260 --> 00:03:42,350
Sometimes this stuff can fail depending on the many combinations of versions of each thing that are

50
00:03:42,350 --> 00:03:48,620
possible, but usually just Googling your error message will lead you to the right solution on StackOverflow.

51
00:03:48,890 --> 00:03:55,970
If you're on a Mac, you can just do pseudo pip install Nampai say by a Python Panda's map plot live

52
00:03:55,970 --> 00:03:56,570
in Seattle.

53
00:03:56,930 --> 00:04:01,250
Alternatively, you can use easy install, which might have a more recent version.

54
00:04:01,970 --> 00:04:08,510
You may need to use easy install to install PIP itself, which is just too easy and stop it if you want

55
00:04:08,510 --> 00:04:09,770
to install TensorFlow.

56
00:04:10,160 --> 00:04:12,620
Just copy the command at TensorFlow dot org.

57
00:04:12,800 --> 00:04:16,970
It's just a pip install command that points to their custom installation location.

58
00:04:17,540 --> 00:04:22,670
I won't put it here, since it corresponds to a specific version, and that version may become out of

59
00:04:22,670 --> 00:04:24,080
date by the time you watch this.

60
00:04:24,680 --> 00:04:28,880
That is good news because the people working on TensorFlow are updating it all the time.

61
00:04:29,450 --> 00:04:34,550
All right, so if you've made it this far, that means you want to install a virtual machine with Linux

62
00:04:34,550 --> 00:04:40,070
on Windows or that you're already using Linux and you want to know what commands to use to install these

63
00:04:40,070 --> 00:04:40,640
libraries.

64
00:04:41,600 --> 00:04:48,530
We are going to need two things to start for this tutorial VirtualBox and a lightweight version of Ubuntu.

65
00:04:49,100 --> 00:04:51,440
I would recommend Ubuntu or Lubuntu.

66
00:04:51,920 --> 00:04:58,790
I'm going to use the 64 bit version of Ubuntu for this tutorial, so download these first and then returned

67
00:04:58,790 --> 00:04:59,600
to the tutorial.

68
00:05:00,260 --> 00:05:06,770
All right, so now that you've got VirtualBox installed, we're going to create a new machine with 64

69
00:05:06,770 --> 00:05:07,730
bit lubuntu.

70
00:05:09,200 --> 00:05:12,110
So you want to hit new type in a name for your machine.

71
00:05:17,910 --> 00:05:19,740
And this stuff is already correct.

72
00:05:22,380 --> 00:05:23,640
I'm going to choose a.

73
00:05:25,210 --> 00:05:29,800
Two gigs of memory, you can choose more memory if your computer has more memory.

74
00:05:33,680 --> 00:05:35,870
I'm going to create a virtual hard disk now.

75
00:05:39,260 --> 00:05:44,030
I'm going to choose dynamically allocated and eight gigs is good enough for this example.

76
00:05:50,070 --> 00:05:52,560
All right, so I'm going to go to settings.

77
00:05:53,820 --> 00:05:55,170
If we go to storage.

78
00:05:57,200 --> 00:05:58,580
You can choose.

79
00:06:05,210 --> 00:06:12,920
The ISO file that you downloaded, so I'm going to load up the Lubuntu ISO that you downloaded from

80
00:06:13,430 --> 00:06:14,270
Lubuntu Dot Net.

81
00:06:15,800 --> 00:06:17,090
All right, so hit OK.

82
00:06:19,360 --> 00:06:20,260
And it's start.

83
00:06:22,220 --> 00:06:28,610
Hey, so it's going to take you through the installation of everyone to so you want to hit install stall.

84
00:06:35,690 --> 00:06:38,630
All right, so Element two is going to take you through some prompts.

85
00:06:49,160 --> 00:06:55,400
All right, so you want to erase this and install Lubuntu, and I'm not going to check any of these

86
00:06:56,900 --> 00:06:58,370
sit continue.

87
00:07:22,940 --> 00:07:25,520
All right, so once that's done, it's going to ask you to restart.

88
00:07:25,640 --> 00:07:27,140
So just to restart now.

89
00:07:57,600 --> 00:08:03,930
All right, now that you're in the machine, what I always like to do, if you notice how this window

90
00:08:03,930 --> 00:08:13,560
is too big for my Mac window, you can make the inner window resizable by installing guest editions.

91
00:08:13,570 --> 00:08:17,760
And this also lets you do useful things like cut and paste between machines.

92
00:08:24,040 --> 00:08:25,540
So you want to open a terminal?

93
00:08:25,930 --> 00:08:29,350
You go to system tools, select Flex Terminal.

94
00:08:34,909 --> 00:08:36,740
Now, when a city into.

95
00:08:38,260 --> 00:08:39,010
That folder.

96
00:08:50,590 --> 00:08:50,930
Cool.

97
00:08:50,980 --> 00:08:58,960
So the correct command was siru dot slash v box Linux editions that run.

98
00:09:00,700 --> 00:09:04,920
Notice how there was something that failed in there, so we need to install.

99
00:09:06,790 --> 00:09:10,000
So you want to run sudo apt get update.

100
00:09:13,110 --> 00:09:16,710
And then run sudo apt get upgrade.

101
00:09:24,710 --> 00:09:32,000
So the next thing is, you want to sudo apt get install, build essential.

102
00:09:36,420 --> 00:09:44,310
All right, once you've done that, we can try to run VBox editions again, so that Sudoku.

103
00:09:45,500 --> 00:09:46,610
Dot slash.

104
00:09:50,050 --> 00:09:51,700
V-Bucks, Linux.

105
00:09:54,250 --> 00:09:58,690
All right, so everything worked this time, so we're going to restart this machine.

106
00:10:07,310 --> 00:10:11,180
All right, so now the window is only as big as I want to drag it.

107
00:10:13,610 --> 00:10:17,780
OK, so now we can install the actual data science stuff.

108
00:10:19,220 --> 00:10:26,960
So you want to open again Alex Terminal to a pseudo apt get update again.

109
00:10:35,920 --> 00:10:37,270
And you want to install.

110
00:10:39,960 --> 00:10:46,080
So it's a long list, so Python, Nampai, Python sci fi.

111
00:10:49,270 --> 00:10:54,220
Python Mat Plot Lib I Python.

112
00:10:55,750 --> 00:11:03,520
Python, PIP, Python, Dev and Python set up tools.

113
00:11:07,110 --> 00:11:07,620
Yes.

114
00:11:12,710 --> 00:11:17,300
All right, so now that that's installed, you can test it out and type in a python.

115
00:11:19,570 --> 00:11:23,140
So a python is open, import Nampai.

116
00:11:25,390 --> 00:11:30,970
Implies working in broad sci fi import pandas.

117
00:11:33,000 --> 00:11:34,300
Right, we don't have a panacea.

118
00:11:34,540 --> 00:11:37,360
We will install our next import.

119
00:11:38,140 --> 00:11:38,970
I plot lib.

120
00:11:41,670 --> 00:11:41,980
Cool.

121
00:11:42,030 --> 00:11:44,640
So we have everything we've installed so far.

122
00:11:47,250 --> 00:11:48,840
So now we're going to install

123
00:11:51,360 --> 00:11:52,560
pandas and piano.

124
00:11:55,050 --> 00:11:58,530
So that's pip install minus minus upgrade pandas, the A..

125
00:12:06,110 --> 00:12:09,740
All right, so now we've got Fiona, the last thing we need is TensorFlow.

126
00:12:11,560 --> 00:12:18,130
To get this, you guys want to go to the TensorFlow website and just grab the latest command since they're

127
00:12:18,130 --> 00:12:19,840
updating the package all the time.

128
00:12:22,040 --> 00:12:23,420
So let's open a browser.

129
00:12:27,950 --> 00:12:32,050
Let's search for install TensorFlow.

130
00:12:48,770 --> 00:12:50,450
All right, you take this code.

131
00:12:54,870 --> 00:12:58,800
Copy it, you paste it in here.

132
00:13:02,880 --> 00:13:05,160
All right, now, you've got piano and TensorFlow.

133
00:13:06,180 --> 00:13:07,290
You can test them out.

134
00:13:08,520 --> 00:13:16,530
Go to GitHub dot com slash lazy programmer slash machine learning examples.

135
00:13:40,670 --> 00:13:46,820
All right, so you need to get if you want to check out this code with get, so let's install get.

136
00:13:57,480 --> 00:13:59,580
All right, so let's run our clone command again.

137
00:14:06,180 --> 00:14:08,100
Let's try the setpiece version.

138
00:14:17,870 --> 00:14:19,160
OK, so this one works.

139
00:14:23,870 --> 00:14:31,010
All right, so you see into machine learning examples go into and in class two.

140
00:14:31,310 --> 00:14:33,770
So this has some introductory.

141
00:14:35,200 --> 00:14:36,640
TensorFlow and the andno code.

142
00:14:37,300 --> 00:14:43,630
So just run Python Fino one Pi, since this does not require any data.

143
00:14:48,390 --> 00:14:53,100
Cool, so it seems everything is working now, let's try the TensorFlow example.

144
00:14:53,550 --> 00:14:55,020
So it's TensorFlow one.

145
00:15:01,880 --> 00:15:06,020
All right, so you want to make sure you install the correct TensorFlow.

146
00:15:06,740 --> 00:15:08,870
You want the CPU only version.

147
00:15:38,580 --> 00:15:41,670
Hopefully it just overrides the other version without any trouble.

148
00:15:43,710 --> 00:15:45,210
So let's try the example again.

149
00:15:50,720 --> 00:15:52,760
Super, so now everything is working.

150
00:15:54,140 --> 00:15:58,490
Now, if you want, there is a text editor that I highly recommend.

151
00:15:59,930 --> 00:16:02,910
It's called sublime text or.

152
00:16:06,230 --> 00:16:07,580
So you had download.

153
00:16:09,160 --> 00:16:11,740
You go to Ubuntu 64bit.

154
00:16:14,570 --> 00:16:15,470
You save this.

155
00:16:24,470 --> 00:16:26,480
And it will automatically be installed.

156
00:16:54,510 --> 00:16:59,190
All right, so now you have the exact same text editor that I use in my lectures.

157
00:17:05,220 --> 00:17:11,160
So you hope in machine learning examples, and this is all of our code.

