Tech AI Chat

Chat on Technology Archive and Insights

Member-only story

Journey to Explore Generative AI

The Right Way to Run Python Locally

Experiment Python Without Messing Up Your Machine Environment

Elye - A One Eye Dev By His Grace
Tech AI Chat
Published in
3 min readMar 6, 2025

--

Photo by Chris Ried on Unsplash

The following is helpful if you’re new to Python and running it for the first time. I initially did it the wrong way and hope you can learn from my experience.

The first time I tried running a Python script, I simply used pip install for all the required packages. This ended up cluttering my machine with packages I only needed once.

Now, I’ve learned that I can create a temporary virtual environment specific to a project. This way, I can install only the necessary packages for that project and exit the environment once I’m done.

Setting Up Python Virtual Environment

1. Setting It Up

First, get into the python project, and setup the Python Virtual Environment.

python3 -m venv <VirtualName>

This will create the <VirtualName> folder in the python project, storing all the needing Python packages for the work

--

--

Elye - A One Eye Dev By His Grace
Elye - A One Eye Dev By His Grace

Written by Elye - A One Eye Dev By His Grace

Sharing Software Learning, Life and Faith Journey

Responses (1)