Exit Lesson

Setting up Python

Course Thumbnail

Setting up Python

Setting up Python: Build Your Throne, No Cap

Sit down, kid. You want to be a Python developer? You want to build AI, automate the world, and make that big tech money? Cool. But if I see you writing code in a Notepad file or using the default system Python, we are going to have a problem. Fr. A real dev is only as good as their environment. If your setup is trash, your code will be trash. No cap. Today, we are going to build you a cockpit that would make a NASA engineer jealous. Sit down and pay attention.

The System Python Trap: Don't Touch It!

Listen closely, because this is where everyone messes up. Your OS (macOS, Linux) already has Python installed. Do NOT use it. That is the system's Python. It is for the OS to run its own stuff. If you start installing random packages there, you will break your entire computer. Fr. I have seen kids have to reinstall their whole OS because they messed up the system Python. Don't be that kid. Sit down and use a version manager.

Enter Pyenv: The Version Master

You need pyenv. It is a tool that lets you install and switch between multiple versions of Python effortlessly. Maybe project A needs Python 3.8 and project B needs 3.12. With pyenv, you just flip a switch. No cap, it is a life-saver. Installing it is the first step to becoming a pro.

Once you have pyenv, you can run pyenv install 3.12.0. Boom. You have a fresh, clean Python version that is all yours. You can set it as your global version with pyenv global 3.12.0. Now, when you type python, you are using the good stuff. No more "which python" confusion. You are...

Want to read the full lesson?

Sign in or create an account to unlock this content and start learning.

Sign in to read