What you'll learn
- Compare cell-based notebook workflows in Google Colab and Jupyter Notebook with the single-file, terminal-driven workflow of an IDE
- Run shell commands in Google Colab with the exclamation mark and import preinstalled packages such as pandas without pip install
- Create a dedicated Conda environment with conda create --name from the Anaconda Prompt instead of working in the base environment
- Launch Jupyter Notebook from a Conda environment, select a Python 3 kernel, and load a CSV into a pandas DataFrame with read_csv
- Explain when local GPU and compute limits make cloud notebooks like Google Colab the better choice over a local Jupyter setup
- Configure a TensorFlow project in PyCharm or VS Code and confirm in a new terminal that the correct Conda environment is active
Free 48-minute video lesson with a full transcript and knowledge checks. No account needed to watch.
๐ Hello and welcome! In this skill you'll Set Up a TensorFlow Development Environment and in this first video, we'll review everything you're going to learn in this skill:
- Google Colab
- Anaconda/Conda
- Jupyter notebook
- PyCharm
- VsCode
- CHALLENGE
Google Colab
In this first video, we'll explore Google's Colab at https://colab.research.google.com/ so be sure to log into your Google account before navigating there. See you in the video!
Knowledge Check
True or False: Google Colab is free but there are no free GPUs available to users.
Anaconda/Conda
In this video, we'll begin to replicate the online cloud version of Jupyter, Google Colab, by using Anaconda, Conda, and Jupyter notebooks. See you there!
Knowledge Check
True or False: Anaconda is a Python distribution for data science and machine learning and offers a free version.
Jupyter notebook
Next, we'll install Jupyter notebooks via Conda environments to then open, explore, and shut down our session properly. Let's do this!
Knowledge Check
True or False: Google Colab is a cloud version of Jupyter notebook.
PyCharm
We won't be installing PyCharm but it is the next most popular IDE, next to Visual Studio Code. Let's check it out and see what the differences might be.
Knowledge Check
What is PyCharm?
Visual Studio Code
Visual Studio Code is by far one of the most popular IDEs for some time due to it's extensible nature and open-source status, oh and it's free. ๐ฅ We'll probably spend most of our time in this IDE so we'll also add some critical extensions for our journey. ๐
Knowledge Check
True or False: You can use Conda environments with Visual Studio Code and recall them with a saved workspace file.
CHALLENGE ๐
Congrats on making it to the challenge and the end of this skill! Here's your chance to showcase your skills by applying everything you learned about ... See you in the Challenge!
Solution Video
Knowledge Check
How would you rate the difficulty of this skill for you on a scale from 1 to 5, with 1 being very easy and 5 being very challenging?
This interactive assessment is available in the full learning experience.
View Transcript
Set Up a TensorFlow Development Environment
0:00Hello and welcome. My name is Jonathan Barrios and in this skill we're going to create a TensorFlow development environment. Let's check out everything that we're going to learn in this skill. The first thing we're going to jump into is Google's Colab and Google's Colab 1L is a or an online version of Jupiter notebook. So what is Google's Colab and what is Jupiter notebook? Well these are iterative development environments where you write code in a cell and then when you execute that cell you get the output right away and you can have as many cells as you like and then you write some more code and you get output and you can also get some visualizations of graphs and things like that. When you 're working with an IDE it's going to be a little different. You're going to have all your code in one file and then here you would have it like a terminal and then you can execute that code and then you would get the readings of that code out here. So it's just a different workflow. One of the cool things about Google's Colab is that it has everything that you need for data science and
1:17machine learning. For example the packages and libraries already installed for you whereas Jupiter notebook is a local version so I'm going to put local and so you'd have to install those yourselves. This is on the cloud made available by Google. So number two the second video is we're going to check out something called anaconda that comes with something called conduct. So these aren't snakes they're snake names but this is really a Python distribution which includes all of the ML and data science packages that you could need for pretty much anything you can think of. And if you need to add something custom you can just simply add it using conduct. And then number three we're actually going to check out Jupiter notebook. And we're going to try to recreate what Colab does.
2:11So we're going to take two and three and try to equal the awesome star power of Google's Colab meaning that we can use a local development environment instead of a cloud environment but get almost the same resources. The only thing that to keep in mind is when you're using Google's Colab they offer GPUs for free. So you're not going to get a free GPU at home in a local environment unless you have some sort of a hookup. So just keep that in mind that's a pretty big distinction.
2:45And then for number four we're going to jump into IDEs and we're going to check out PyCharm which is an IDE by a company called JetBrains. And then number five we're going to check out VS code which is by Microsoft. And funny enough this is open source and free to use. And it has a lot of extensions so you can extend it.
3:16And this is probably what we're going to end up using most of the time but we will be using almost all of these tools at different times. And then number six we'll have a challenge where you get to actually apply everything that you learned in this skill to some sort of final output. In this case it's going to be some kind of TensorFlow development environment. So what is the context here ? Well so far in the introduction for machine learning and introduction for deep learning courses we've used Google's CoLab. It's a great way to get started because you don't really have to worry about a development environment and you can just start working. There are some headaches because it is a computer somewhere in the data center somewhere. So when you want to transfer files forward and backwards it's not as easy as a local environment. So it's because it's a computer somewhere else. So there's some hurdles to jump through .
4:16That's just something to keep in mind. The main power is the ability to use the GPU in Google CoLab. So when you're using a local development environment it's good to remember that you're going to be responsible for the GPU and the compute and all of those things and storage. So that's a huge trade-off. We'll be discussing this as we go through this course. And finally at the very end when we get to the challenge you're going to build your own development environment of choice and well actually not of choice. It's going to be visual studio code but you're going to do something really specific to set up this development environment. Then with all the skills that you have you can set up a development environment of your choice. I guess that's kind of what I was getting to. And the challenge is VS code but after that you can do pretty much any of these combinations that you find advantages for your project. All right so I will see you in the next video which is going to be that video on Google CoLab. See you there.
Google Colab
0:00Welcome back. In this video we're going to check out Google Colab but first I wanted to share this repo with you. This CBT nuggets github and this repo that I wanted to show you is here Introduction to Deep Learning. We're going to have our own repo soon but first I wanted to show you this sunspots CSV right here and I 'm going to click on RAW so that I can show you how Google Colab works and I'm just going to copy this RAW CSV. Now I'm going to go over here to Colab and I search for Colab in Google 1L1 word and I'm just going to click on this first one which is colab.research.google.com and once you're in there and if it's your first time just go ahead and click on new notebook and this is going to open up Google Colab.
0:48You definitely have to be signed in to a Google account and that's all you really need. Generate with AI here that's something new and I would suggest not using that and just keep in mind that if you do use it it's going to be a trial basis and you're going to have to pay for Colab Pro basically but it's a good idea when you're first starting out and you're really trying to learn TensorFlow not to use AI to write everything yourself. If you're going to use AI ask it questions to help you learn. So you use it as a tutor but never just copy and paste anything. Even don't copy and paste the code that I give you. Just code along with me because that helps you get into long-term memory so that you can write the code yourself. I just wanted to just give you a heads up about that AI and now let's do some stuff. Okay so what can we do? The first thing I want to do is show you that you can talk to the terminal, the command line, by using the exclamation mark. I'm going to say Python - version and let this run and to run this I'm going to shift enter and while this is running this is the very first time you see that it's connected to a computer somewhere in the cloud. Now it's connected and we see that we're running Python 3.10. Alright so now I'm going
2:06to show you how you can import things such as pandas and you don't need basically any pip install. So let me explain that. Normally when you are working with packages locally you have to install them. Right so you like let's say you're using like a Python package manager like pip you'd have to say pip install pand as. If you're using Conda environment manager then with Anaconda you would use Conda install pandas so on. So here this is done for you and it's really nice.
2:40When we get to Jupyter Notebook which is a local environment we're going to have to install these using Conda. You could also install it with pip so you have a choice. So I just wanted to give you a heads up that the nice thing about Colab is that has all of this included. So if I run this we're not going to get any errors and we can actually define a data frame and I'm going to say df equals pd.read_csv and I'm going to pass in that raw file and then I'm going to run that and then I'm going to call the first three rows of that data frame so we can just take a look at it. And now you can see that we're just actually getting ready to start some data analysis or data science or machine learning right out of the box. But I think the most important distinction is if you go up here to runtime and then go to change runtime type you can go from the CPU to a GPU and I'm going to say okay let's save and now it's connecting to a GPU and we're there. So look at that we have a Tesla GPU and it's free. This is pretty amazing because GPUs are not cheap especially right now in 2024 they're getting pretty expensive.
3:54Every year is going to get more and more expensive or it's going to become very scarce because more and more companies and individuals are going to start to use these resources. So when you're working locally with Jupyter Notebook you need to have some sort of a GPU. An external GPU card is very common for PCs but very currently Apple Silicon has made GPUs in their own chip. So I'm using the M3 chip and that's actually able to run a lot of models on it locally without having an external GPU. So that's something new we'll talk more about that but this is something that's really crucial to keep in mind if you don't have a GPU you might need to use something like Google Colab. In fact a lot of engineers at Colab, excuse me at Google, would use Chromebooks and then log into computers in the back end. So that's how they're able to use Chromebooks because Chromebooks don't have CPU or RAM or very much storage at all.
4:58So that's kind of something to keep in mind and it's also a trend. And we're not doing anything to use a GPU so I'm going to show you the best practice just to go up here disconnect and delete runtime. That's how you do that or you can just go back to the CPU by going to change runtime type. All right so let me close this resources here gives you a little bit more information about this and again another opportunity to upgrade to Colab Pro. So that's it for this super brief introduction to Google Colab. We'll be seeing our friend again but for right now we're going to jump into Anaconda and Conda. See you there.
Anaconda/Conda
0:00Welcome back. In this video, we're going to check out Anaconda, not the snake, but the Python distribution. Alright, so I just typed in Anaconda and I'm going to click on this first one right here, "Unleash AI Innovation and Value." That's very corporate sounding technique. Alright, so basically, let's just skip all of this stuff and go to the free download. We're going to skip registration and then here we can see that we have the different options.
0:30So if you're on Windows is pretty straightforward. You only have one option. It 's a graphical installer. With Mac, you can use homebrew and you have these other options, but what I would recommend, I'm on a silicon, so I use this. But if you are not and you're using Intel or everything else, just use this one . And if you're on Linux, you'll know what to use. Alright, so I've already installed this, so I'm just going to skip this stage and then once you have installed this, then unpause or just come back and join me.
1:00Once you're done installing and it's actually, this usually pops up by itself. So this would be the first thing you see. If you don't see this and it's not popped up, then just click on Anaconda Nav igator. And here you can see that we have Jupyter Notebook. We can just click on launch and it would work straight away. And what else do we have? We have Anaconda Notebook, so they're doing their own cloud version of notebooks. And here we have PyCharm. This is what we're going to talk about as well. We're not going to get into Spider, but that's another IDE.
1:31And Visual Studio Code, which we're going to talk about, it's used to be here, but it's not here any longer. I could just click on this button here to launch Jupyter Notebooks, but we're going to do that in a separate video and we're going to do it a different way. We're not going to just rely on the Navigator to open it up and click this every time we want to run this. And instead we're going to go over here and work with this a little bit. Let me make this a little bit bigger. Alright, now that we're here, you can see that we don't have, it doesn't say base here, but if it did, it should if you've installed Anaconda. So now I'm going to say Conda Activate.
2:12Then you'll see this. This is probably what yours has already, if you're on a Mac. Now if you want to find this for Windows, it's called the Anaconda Prompt. And what you want to do is just go to the Start menu and press on the Windows key and then type Anaconda Prompt into the search bar. And when you do that, you're going to probably see the Anaconda Prompt pop up. If you don't find it there, it's also available in the Start menu by scrolling through the list of apps under the Start menu.
2:46Alright, so once you have that up and running, I have Conda activated here, but this is a base environment where we have all of the packages involved like everything. So you don't want to use this. And instead what you want to do is create an environment. This is how you do that. Conda create dash dash name and then the name of the environment. I'm going to call mine TF_PRO. And then you would install whatever you needed. Let's say pandas, right, and TensorFlow.
3:19And then once you do this, you click on this and then you scroll through the, basically it'll ask you yes or no if you want to create it and you say yes, and it'll create this for you and it'll also install pandas and TensorFlow. And then once you do that, it'll activate that base for you and you'll see that here. I've already created this and so I'm not going to create it, but that's how you would do that if you wanted to create your own new environment. And you might be asking, well, why are we doing this? The reason is you might have one project that has web development stuff like Python and Django.
3:55You might have another project has nothing to do with web development and it's just machine learning. So you have TensorFlow and pandas. The thing about this is when you share your projects, you don't want to share every project or every package ever made with every project. So you want to keep it as tight as possible. So we only install the things that we need for that project. And that's very efficient. So you can imagine if you're sharing this with people, you want them to make it as simple as possible. So that's some of the reasons why.
4:27All right, so let me keep moving on. And now what I'm going to do is say, oh, I forgot the name of my environment. So I'm going to say, Conda and list so that it can show me. And I can see, oh, here it is. Tf Pro. That's the one that I created. So I'm going to say Conda activate Tf underscore. Oops. Tf underscore pro. There we go. And now you can see that we're activated. And this is going to be the project that I'm going to use for the professional TensorFlow developer course.
5:04Right. And so this is why I would call it this. And then I would have all the packages needed for that project. If I wanted to run Jupyter Notebook, I would have to install it. So I would say Conda install. And then Jupyter, which I've already installed. But this is how you would do that. And if you wanted to run it, then all you would have to do is just type in Jupy ter Notebook. From wherever your project is. So we're going to do that in the next video. But I'm just giving you a heads up that that's how it works. And let's say we 're done now.
5:37Okay, I'm done developing. So I'm going to say Conda deactivate. And when you do that, it goes from TF underscore pro to the base. But if I did it again, then it just goes away. All right. So that's about it for this video. And I will see you in the next video when we jump into Jupyter Notebooks.
Jupyter notebook
0:00Welcome back. In this video we're going to dive right into Jupyter Notebook from the terminal right where we left off of. So now here how do we get started? Well first of all I'm going to activate Conda. So Conda activate and then what we're going to do is Conda activate and then the name of the project so it's TF_PRO. Okay and let's just say that I'm not in that I'm in my users folder but I want to be in my project folder. So let me just create one here and I'm just going to name this github. So what I'm going to do is navigate to das tab and it auto completes for me and then I'm going to say gi tab and then at auto completes it kind of knows what these names are in these directories just a little tip there and then if I hit enter now I'm in that github folder on the desktop. So from here I'm going to say Jupyter Notebook because I've already installed this using Conda install Jupyter. So now that I have that installed in this environment I can just do this and instantly it creates this environment and
1:20I'm going to go over here to new notebook. There's our notebook now I can double click on that and now we get to choose a kernel. We're not going to get too deep into this right now. If you click on this you can see there's no additional kernels. There's a way to deal with this so what I'm going to do for right now is just select a Python 3iPy kernel. Okay so now that I'm in here I've already installed Pandas right so if I said let's try the Python - - version just like we didn't call that and we're using a newer version of Python 3.12. Okay and what else? Let's try some Pandas so let's import Pandas. It's PD and I'm going to define this URL that we copied earlier like this and then gf I'm going to create a data frame and use PD.read_csv and then I'm just going to pass in the URL like that and then I'm going to call the first three the head three first three rows. Alright let's try that and instantly we get it access that's the
2:36repo grab that CSV read the first three and we're ready to rock so this is Jupiter notebooks and the only caveat here is that you can't go to kernel and say give me a GPU because that's your job so we're responsible in a local environment for providing the GPU in any of the compute requirements something to keep in mind and makes these online computers really attractive right so there's a lot of services that offer this so just keep that in mind but as you see here it says shut down kernel shut down all kernels what's all this well this has a little bit to do with how we want to get out of this so there's different ways of closing this down if you wanted to stop you could interrupt a kernel like this but what it's pretty common is to go here to file and then go to shutdown or you can close and shut down notebooks let's try that and yes I'm okay with that alright there it is and then now we're here if we go to running nothing is running and then we can go to file and then shut down and let's shut that down and if we go back over here you can see that our server is
3:52no longer running but we're still here in TF Pro and if you wanted to you could deactivate conduct deactivate and now we're in base and if you want to do that again now we're completely out and we can type clear and that's it that's the end of our session all right so now we're ready for IDEs and I will see you the next video where we jump into PyCharm and VS code see you there
PyCharm
0:00Welcome back. In this video, we're going to check out IDEs because we've been looking at Google Colab and Jupyter Notebook and those are interactive notebooks. Right? They have these code cells, you write something and then you get that output, which is really nice. When you're working with an IDE, you're usually working with a .py file if you're working with Python and then you're going to execute that script in a command line somewhere and then it'll give you an output and it's really hard to see visualizations and things like that. It can happen, but it's really a clunky way to do it in an IDE. Things have gotten a lot better and that's why you basically can work with an IDE now. But for a minute there, it was kind of like there was people that were using interactive notebooks and there's people that were using IDEs. Now the thing happens where you get this interactive notebook like it could be Colab or it can be Jupyter Notebooks, that file extension is .ipynb and that stands for IPython notebook. So that used to be the name of Jupyter Notebook before and then it changed the names to Jupyter Notebook. So instead of IPython Notebook, we have Jupyter Notebook but it keeps that file extension anyway. Long story short that
1:16IPynb file extension for production usually needs to get converted to a .py.py file and so that's why working in an IDE is one of the reasons at least that makes it very useful. So let's dive into it right now. However, we're not going to be using PyCharm. We're just going to kind of talk about it but we're going to spend most of the time working with Visual Studio Code because first of all it's free and it has a ton of extensions so we can make it very very flexible.
1:46Alright, let's do this. So here we're going to make your software reality, make your software vision a reality. Alright, so developer tools and where is our reality ? PyCharm. Okay, so here it says the Python IDE for data science and web development. So that's a lot. So this is like an 18-wheeler compared to driving your comfortable Honda, right? So that's a famous saying by the person that created Python and it's true, right? They were talking about different IDEs but it's a very apt comment because this IDE can do so much stuff and you might not need to do a lot of that stuff. For example, if you don't do anything else except for data science, you're not going to need to do web development. So all of that, which is a huge amount of tools, can just go away. So it's something to consider. Alright, so let's take a look at this and this is what it looks like.
2:47Pretty much looks like Visual Studio Code if you're familiar with that interface and definitely check out this video if you want to. So here you can see that we have Python which is great but we also have Django, Flask and Fast API which are mostly, I would say these two are for web development. Jupiter, SQL, Anaconda, and Pandas, well this is kind of more our sort of flavor. Alright, so it empowers developers to be more productive and makes difficult coding tasks easier. And yeah, so again, it's a little bit overkill. There's a debugger, all this great stuff. Now if you want to dive into the data science part, we can just click on this to sort of focus in on that and it can go into all this stuff and this context aware AI, again, that's something that we saw even with Google Colab and so everybody's going to be doing this and here you can see that wow, everything that you need, even hugging face, TensorFlow, Keras, scikit, learn. Anaconda, but it's right and even Docker, we 're not talking about Docker but this is something that's very, also very, very relevant. So if you wanted to download this, let's go to the download site and it'll basically see that I'm on a Mac and then just say download this one.
4:05If you're in Windows, it's also a downloader and we're okay. So basically we don't have a lot of options here. Let me see for Intel. Okay, cool. We do have an Apple Silicon. This is what I would be downloading. So just, you know, if you want to do this, download it and check it out, you can do that or you can go to an anaconda navigator and where's PyCharm? PyCharm Professional Install, right? So this is a full-fledged IDE, meaning that 18 Wheeler, that's why we're talking about does a lot of stuff here's talking mostly about web development.
4:39All right, so that's it for this video and I will see you in the next video when we jump into Visual Studio Code. See you there.
Visual Studio Code
0:00Welcome back. Alright, let's dive into Visual Studio Code by downloading it. And here is the download and you have some different options. So for me there's no silicon so I would just basically use the stable universal installer. Once you have that installed we can go over here to our desktop and we can try to create some projects here. So this is what we used before so I'm just going to exit and get a new one and I'm going to make this a little bit bigger and what I'd like to do now is create that project. So I'm going to Conda activate. Alright, so we new Conda and a Conda install and so now we have our base loader here and we can create some environments or some yeah some Conda environments. So I'm not sure if you installed it before but if you did great if not let's do that now. So we want to say Conda create and then dash dash name. Then before I finish this I do want to share this Conda cheat sheet with you and this will be linked in the skill and here you can see basically anything that you need to do. So here is Conda create dash dash name and then this is the name of the environment and
1:18then here you can install Python whatever version you want or if you leave this blanket will install the newest one the latest version that it has and then you can install other things other packages right. So if you wanted to install pandas you think you can do that here as well. So this is a really great cheat to have like Conda and list is right here Conda list will list all the packages and versions installed in that active environment whatever is in the parentheses.
1:49Okay, so we're going to create name and then we're going to say TF underscore pro which I already created but I'm just showing you how you would do that and what we want to do here is add pandas and TensorFlow and we're also going to add Jupiter like this and run that and then you'll have you can activate that by using this name so Conda activate TF underscore pro. Now let's say that you've already done that but you've and you only installed it pandas and TensorFlow but you did not install the others so what you could do there is first Conda activate and it's TF underscore pro and now that you're here if you need to install Jupiter you can say Conda install Jupiter like that and then once you do that then you can run Jupiter notebooks but we're more interested in Visual Studio Code so what we're going to do here is just make sure that we have this TF underscore pro created and have all the packages installed that we're going to use we can add more later but we have this done so now I'm going to say Conda de activate
3:05I'll do that twice all right and then clear and then boom we have a clear terminal and now we're ready to start working with Visual Studio Code. All right so this is a new window and I've already created a project but we're not going to look at that just yet let's just think of this as the first time that we've run this if you use shift command P you can get this sort of area and then you can add some different things for example you can say execute code shell command install code in the command path that's something that you want to install so you could write it like however you want to write it to get to this point so if you click on this it's going to install code in the command path and let me show you what that does once you have that done you can go ahead and close Visual Studio Code I don't even hit quit here and then what I want to do is I want to navigate to cd desktop and then inside of that desktop I want to go to TF underscore pro let's go in there now we're there and now from here I can say something like code and then period when I do that it's going to open that oh
4:25it's not working oh I know why let's open this up and install it together because I have not installed that I thought I did so it's run code or is it once it install code from there it is so shell command I'm going to click on it and now it's going to say okay and then my password all right so shell command successfully installed in path and so now I'm going to close this and then I'm going to try that again because I'm still in the terminal and I am in that correct directory so if I use code period it's going to open that up in that directory so that's something really handy to have so that's the first thing all right so before we get into anything else I want to show you what all of this is here on the side okay so first this is the file explorer and you can see here that we have the different file types and this is where you would create new folders and such and then here this is searched and you can search all kinds of things in here for missing files or certain classes and things like that and
5:43source control is really cool and this is where you could connect to you get hub repository for example and push your changes to that repository which will we will be doing quite a bit of and then here is a debugger so you can actually run this to debug this is mostly something that you would find a lot in web development and those kinds of workflows but it's also you would see this in data science as well it's very useful and so this is a debugger and then here are some extensions so let's go ahead and install some extensions now so I'm going to say Python ext for this extension so what I want to do here is install this one and this one and this one so these three that's it so don't install this one this one or this one that's my recommendation and we don't need a python environment manager because we're using a conda okay so once you install these three we can move on to the next one which is Jupiter there we go click on this and I've already installed this you can see that is installed so go ahead and install this and then once you do that we'll get into
7:01how you can actually have the best of both worlds meaning you can have something that looks just like an interactive notebook right inside of visual studio code and there's multiple ways that you can actually leverage this because it's really useful to have the iterative code cells so that you can see things run as you're working because it's common to jump back and forth right but if you're in a dot pi file it's actually not that great because you need to run the whole script but this plugin will allow us to like highlight a section and then see it run in like a virtual notebook so it's like pretty amazing stuff so let's okay definitely install this let's keep moving there's so much to install that there's all kinds of stuff so I'm gonna say dark theme okay and this is the one that I usually use and so I'm going to go ahead and install this one and once you do that you can go over here to settings and profiles not themes and I'm gonna say color theme and here you can set them up so I'm gonna say dark plus
8:22okay and then another cool thing that you can do is set up some sort of icon theme I use this material so I'm gonna install that one okay and then you can set it here or you can go down here to themes and file icon theme that's the one that I want and we're gonna use the material icon well we can use either one of these let's just use this one okay and what does that do well here it actually changes these little icons to look really cool and this is I find it's really useful to tell the difference between files and so I really like that and I like this dark theme too all right so there's really a lot more that we can install here but I mean just just a lot so take a look but I wouldn't install too many more because you can actually get some conflicts and that's actually I'm glad I said that because we go here and we go to this read me I wanted to bring this to your attention so let me show you how you can get the terminal click up here and do terminal or you can use this shortcut and here you can see that there's no base or anything like that so how do you deal
9:41with that so down here well this is a read me file but I wanted to show you that if you activate it if you said come to activate it would say base and then you can activate TF_pro or whatever name of your environment the problem here though is that it would say base and the TF_ so it was showing too so this is I went to stack overflow here let me show you this link there we go so you can see it says base and then whatever the name of that environment is so that was happening and so that can happen with conflicts so if you go down here the reason that there was like there we go as described on this page the Python extension now automatically activates the environment so it seems that the problem is caused by the automatic activation it's by that plugin so you could use this right here to copy this and basically go back to the terminal and then paste it there run it and then restart this sometimes you have to restart the computer but then it will fix that problem so that is something that can happen and this is just read me file .md for markdown where you can just write text in it all right so let me show you something really cool I'm
10:59gonna get out of here and I'm actually just going to close this just quit code completely and then I'm gonna open this folder that I have here this is the folder that we've been opening up in Visual Studio code you could just say code period because we're in that folder here in the terminal or you can grab it and just drag it in which is not the most programmatic way of doing it but you could do it that way or go back to this folder and you see that I have this workspace file if I double click on this look what happens this is really key right here you didn't really notice this but out but here is the Kanda environment which is this is pretty important this is kind of tricky let me show you let's open up the terminal okay if I click on this it shows you that it's a Kanda environment that we created it's not the base but the pro and this is exactly what we want to have if you go to terminal and go to new terminal you can see that we have that selected so this is pretty cool this is how you use these Kanda environments in the right kernel using VS code this is pretty cool and don't worry if this is a little bit overwhelming it's a lot of information
12:17we're gonna go over this again and again and again and so every time we start a skill we're going to set up our development environment you know using whatever we're using but it's going to be a review of this so it's going to be something that's not just like all this information all at once all right so what we're gonna do now in the next video is set up our challenge so I'm gonna try to get you to to to accept this challenge and make it interesting for you and well the main goal is to create a main.py file a readme.md and then once you do that you want to go to file and then save workspace as and once you do that you'll have this workspace safe and then I'm going to show you in that video the solution video how to get the proper environment and if you've already created that your own con environment is just by clicking this and selecting it really so if you do that and then you save your workspace every time you click on that workspace file it'll open this up and you'll be in the proper con environment you don't have to write anything in the terminal pretty awesome so I'll see you in that next video where we kick off the challenge
CHALLENGE ๐
0:00Welcome back and congratulations on making it to the end of the skill and to the challenge. This is going to be awesome. Let's do this. All right. So here we have this empty page. And what we want to do in this is add some code. But first let's close this and your challenge is to create your own Kanda environment, a new one and then a new folder for your project. To navigate to that folder in the terminal and use code space period to open it .
0:35So mine is TF_PRO. Yours can be whatever you name it and then open that project using this method. That's part of the challenge. And once you do, let me actually just go ahead and do that. And once you do, you want to create a readme. And in here you can say anything like hello or like I did it or whatever you want. And then here in the main.py you're going to do what we did before in previous videos. And I'm just going to make this pretty straightforward. So you're going to add a comment here.
1:07So import pandas with alias. So I'm going to leave that as a trick. Not a trick but a challenge. And then here what you want to do is create a data frame. So this should be pretty easy but I'm going to make it even easier. So it's PD.read_csv and then in here you're going to pass in the URL. And you're going to have to define that URL up here and put it in quotes.
1:42And then you can uncomment all of this stuff and then just write the code down here. This is just comments to help you out. And then in the next video we're going to, in the solution video, we're going to, I'm going to show you how to do all of this stuff from scratch. And make sure that you are in the correct conduct environment that you created. Right? You don't want to be in base. And if you want to double check you can go to terminal and say new terminal to see if you are really in there. All right. So you got this and I will see you in the solution video next.
CHALLENGE ๐
0:00Congrats on completing the challenge and let's take a look. So first things that we want to do here is navigate to the right directory and I can use pwd print working directory to see that I'm already in the right directory. So that's cool. So now I'm going to say code space period to open Visual Studio code in that directory and now look where we are. So let's just say that I created this and the way that I would do that is click on this plus sign and just say main.py. But it already exists. I'm not going to do that.
0:30I want to create the read me. I would also do that all caps. That's the convention read me dot MD for markdown. And then this is what we're going to do last. All right. So here let's do the first thing. So we need to import pandas with the correct alias. So import pandas as pd and we're going to define that URL here. So let me go to this place introduction to deep learning sunspots sunspot CSV grab that.
1:08Oh, I need raw first because otherwise it will not work. It needs to look like this. Then we grab that URL go back put it between the double quotes. All right. So now that we have pandas imported, we have the URL. We can say df equals pd dot read underscore CSV and just pass in that URL. And then we're going to say D we have to use print and I'll explain why print.
1:38And then here we're going to say data frame dot head. And let's just look at the first three. If you want to look at the last three, we can do that using tail. Let's not trail tail. All right. Let's save this and then now what we're going to do is execute this. I'm going to say main Python main dot hi. And there's the last three. All right.
2:09So this is how you complete the challenge except for one last thing. All right. So now that we've done this and congrats for being able to do all this is really awesome. So now what I'm going to do is I've got this set up and I'm going to make sure I'm going to go over here. I do see that we're using the right TF underscore pro conduct environment. So that's good. So now that we have it like this, we don't want to have to set it every time because you do have to click on this every single time.
2:39It's kind of a pain. So the way we work around that is now say save workspace as and then I would basically save that in whatever you finally want and then click save. I've already done that. Let me show you what the benefit of doing that is the benefit is this whenever you want to start working on your project, you just go to your project, you open up that folder and you double click on this and you're done. And you can see that you have the TF pro already selected and you're ready to go. If you wanted to run that file again, you could, but we're not going to do that .
3:13All right. So that's it for this video. And wow, we've covered a lot of information and don't worry if it's not all 100 % clear. We're going to be using all of these tools in one way or another because we have to use different tools and that's what we're going to be doing. So until next time, I hope this has been informative and like, thank you for viewing.
Frequently asked questions
What does the Set Up a TensorFlow Development Environment lesson cover?
The lesson compares cell-based notebook workflows in Google Colab and Jupyter Notebook with the single-file, terminal-driven workflow of an IDE, then walks through Anaconda and Conda, a local Jupyter Notebook setup, and project configuration in PyCharm and VS Code. It closes with a hands-on challenge where the learner builds a working TensorFlow development environment that loads a CSV into a pandas DataFrame.
How long is the TensorFlow development environment lesson, and where does it fit in the Professional TensorFlow Developer course?
The lesson runs 48 minutes and covers the environment setup that comes before the rest of the course. The Professional TensorFlow Developer course then moves into core tensor operations and model building, with its listed modules totaling about 32.5 hours of training per learner, so Team Leads should plan it as a multi-week track.
Why create a dedicated Conda environment for TensorFlow instead of using the base environment?
As the trainer explains, the base environment holds every installed package, so the lesson has learners run conda create --name from the Anaconda Prompt to build a separate project environment. In the IDE, learners then open a new terminal to confirm the correct Conda environment is active rather than base.
When should a team use Google Colab instead of a local Jupyter Notebook for TensorFlow work?
In a local Jupyter setup, the team is responsible for providing the GPU and compute, while Google Colab connects to a computer in the cloud and comes with data science packages such as pandas already installed. The lesson explains that team members without a suitable local GPU may need a cloud notebook like Colab, which requires only a Google account to sign in.
What should a team member know before taking this TensorFlow setup lesson?
The course is designed for data analysts and IT Practitioners who already have basic data analysis or Python familiarity. In this lesson, that background is applied to tasks like running Python version checks, importing pandas, and using read_csv to load data.
How can a Training Manager roll out and track this TensorFlow course across an IT team?
CBT Nuggets Playlists can sequence the Professional TensorFlow Developer course for role-based onboarding, so the environment setup lesson lands first for every learner. Team Reporting gives IT leaders per-learner progress and completion, cohort and group views, and completion exports for audit evidence.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
Free training library
More free lessons in Data Analytics
Data Analytics
SQL for Data Practitioners: Introduction & Setup
Free lesson from SQL for Data Practitioners ยท 49m
Data Analytics
Explore AI Language Models and OpenAI's ChatGPT
Free lesson from Programming for Data Science ยท 44m
Data Analytics
Installation and Setup
Free lesson from Python and Pandas for Data Manipulation ยท 53m
Data Analytics
Python Development Environments
Free lesson from Introductory Python for Data Analysts ยท 1h 1m
Data Analytics
Foundational Statistics for Data Analysis with Excel: Analyze Data with Excel
Free lesson from Foundational Statistics for Data Analysis with Excel 2022 ยท 45m
Data Analytics
Explore Deep Learning Foundational Concepts
Free lesson from Introduction to Deep Learning ยท 44m
$59
seat / mo, billed annually
