Imagine being able to run all the scripts you've seen immediately on your computer and sending those results to your team! In this blog, I'll be personally walking you through how to setup python on your computer. Don't worry, it's pretty simple!
If you're still wondering if you should learn python as a marketer, read this blog on the 9 reasons marketers should learn Python.
The first step to setting up Python on your computer is downloading Python to your computer.
First, go to https://www.python.org/downloads/
You will see this screen with crates and parachutes. This is the official Python website.
Click the big yellow button that says "Download Python 3.8.2"
Click Agree to everything ( you are probably selling your soul for Python wizardry )
Next, search for your Terminal on your computer. I have a Mac so I will show it on Mac.
You want to install PIP onto your Python package.
PIP installs packages onto your computer for python.
sudo easy_install pip
Sudo is a function that overrides restraints on your computer. It will ask for your password.
It will not look like you're typing it in. That is a security measure. Type it in anyway and press enter.
A library is simply a group of scripts someone else wrote that allows you to achieve amazing things.
Python is pretty neat, but the beauty of it is that there is a library for EVERYTHING and some are incredibly powerful.
You will need "Requests", "BeautifulSoup", and "Pandas" for now.
Requests will allow your scripts to pull and push information to and from the internet.
Think of requests as your URL address on your browser.
In your terminal, type in the following code.
pip install requests beautifulsoup4 pandas
If you are seeing errors, don't worry. It probably is an administrator problem on your computer.
Simply retype it with "sudo" in front and type your password in.
sudo pip install requests beautifulsoup4 panda
To make your life as easy as possible, I recommend setting up a Python Integrated Development Environment ( IDE ).
Don't freak out at those big words. An IDE is simply a layer between you and the code that makes writing code a lot faster.
PyCharm is the IDE I use. It doesn't require too much setup and is pretty helpful.
You can download it from these links below.
PyCharm Download Link for Windows
Simply agree and move forward.
When you open PyCharm, click File, Create New Project, and create a project called "learning_python". Finally, click "Create".
Then on the top left, hover over your "learning_python" folder, right-click it, and hover over create New.
Then click "Python File" and name your Python File "python_test".
This is your first script!
A script is simply a bunch of programs in a sequence.
Scripting is often used to be run by the user, but can be automated in the cloud.
Now you're ready to build your first Python marketing script! Let's start working on your project.