March 10, 2018
If you have a basic understanding of programming and are eager to get into the domain of Artificial Intelligence, Machine Learning and Data Science, among many other, but is baffled by where to start, then this article is absolutely for you. Why Python?
“Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java. The language provides constructs intended to enable clear programs on both a small and large scale.”
The following guide is divided into 7 steps. 7 comprehensive steps to get you up and running Python scripts in your machine and tackling real-world problems.
Set your own appropriate directory to Scripts. You can check whether if Python has properly installed in your machine by heading over to Command-Line and typing python. If you get something like this, you are good to go. Also shows the version of Python running on your machine.
My text editor of choice is Sublime Text 3. You can download it here. I would highly recommend watching this video which will help you setup and beautify your ST3.
Note: You will need to install SublimeREPL package to run your Python code because the default ST3 console sometimes fail unexpectedly.
Welcome to the world of packages/libraries! Simply put, and to quote Siraj, “Dependencies are packages that our code depends on.” There are tons and tons of packages out there that will help you write your Python script. Each library serves a specific purpose.
There is only one rule however, you need to install them before using them.
There are quite a few ways to install packages. I prefer pip install.
But what is pip install?
pip is a package management system used to install and manage software packages written in Python.Cool Fact: pip is a recursive acronym that can stand for either “Pip Installs Packages” or “Pip Installs Python”.
Okay cool. But how do I pip install a library?
Here’s an example of how to pip install a Python package –
Some libraries require an additional step before the pip install. You need to download their respective wheel(.whl) file from here, put the file in your Scripts folder, head over to the cmd and pip install the file. (Hack: just type a few letters of the file name and hit ‘Tab’ to auto-complete the file name). Here’s an example of how to pip install a wheel file –
You will need to google a lot. More than half of the time, developers are just trying to find solutions to their problems in Stack Overflow, reading documentations of a package or its Github readme to know the details of its different modules and how it can be implemented.
Figure out a problem that you would like to solve. Google to find if there are any available Python libraries for this. If not directly, find out what combination of libraries can be used to achieve your goal. Install them in your machine. Read its documentation and even sample code if available to understand its usage.
It is very essential to stay updated with the collective knowledge of the developer’s community world-wide. You can follow on YouTube. He has some amazing playlists on getting started with AI. Another of my favorite is a playlist on of Google. I follow these people on Twitter to get my daily dose of inspiration:
© Amitabha Dey. All rights reserved.