Walk through the process of installing Python 3 and TensorFlow on macOS.
- To work with the code examples in this course, we need to install the Python 3 programming language, the PyCharm development environment, and several software libraries, including TensorFlow. This video will cover installation on Mac OS. If you are using Windows, watch the separate video covering Windows installation instead. The method we'll use to install TensorFlow will only install the core TensorFlow libraries. It won't install the additional components needed to take advantage of the video card's GPU to accelerate processing.
Using a GPU requires special hardware that won't be needed for this course, but if you would like to install TensorFlow with GPU support, please refer to the more detailed installation instructions on the TensorFlow website for the additional steps you need to follow. Okay, let's get to it. First, let's install Python 3. We're at the python.org website. At the top of the page, click on Downloads. Now, we'll see the newest version of Python 3 available for Mac OS.
Click to download Python 3. Click on the downloaded file to launch the installer. We can accept all the default options. Mac OS actually comes with Python 2 already installed, but Python 3 is the current version of Python, and it has several nice improvements, like improved support for working with text in different languages. Either version can be used for machine learning, but there's no reason not to use the latest version. Great, the installation is complete.
Next, we need to install PyCharm. PyCharm is an integrated development environment for Python. Let's go to jetbrains.com/pycharm. Okay, click Download Now, and we'll choose the Mac version which is already selected. We now have the choice of downloading the community edition or the professional edition. Either will work, but the community edition is free and has all the features we need. So let's download the community edition.
When the download completes, click on the file to open it. To install it, just drag the application to the applications folder. Now, let's run PyCharm from the applications folder, and click Open. The first time we launch PyCharm, it will ask us some questions. We can just accept the defaults and move forward.
Now we are ready to create a new project. Click Create New Project. When you create the project, choose the folder where you have downloaded the exercise files, if you have them available. For the interpreter, choose the version of Python 3 that you've just installed. It will probably be selected by default, and click Create. It will pop up a dialogue that tells us that the files already exist. Just click Yes, and you can close the tool tip window. Now, let's open one of the exercise files.
I'll click on 02, and click on Edition Final. As soon as we try to open the file, PyCharm will tell us that some package requirements are missing at the top. Click Install Requirements, and then click Install to confirm. Depending on the version of Mac OS you are using, this process may take quite a bit of time. If there's no pre-compiled version of scikit-learn available for your OS, you'll have to recompile from scratch, but just let it run until it's done. You can monitor the progress in the bar at the bottom.
Great, we are ready to get started.
- What's TensorFlow?
- Hardware, software, and language requirements
- Creating a TensorFlow model
- Training a deep learning model with TensorFlow
- Visualizing the computational graph
- Adding custom visualizations to TensorBoard
- Exporting models for use with Google Cloud