Python 3 — How to manage Python Environment on Mac OS /Linux

Hi All

Today we will see how can we can manage environment using Python

Note : All below commands are executed in Python3 environment.

Python environments are useful when you are working on multiple project and do not want your python dependencies of one project collide with other projects.

1. Create a new Environment

python3 -m venv my_project_environment

2. Activate Environment

Once environment is created you will need to activate environment in order to use it.

source my_project_environment/bin/activate

3. Install Libraries in Environment

You can use pip to install libraries in activated environment or requirement.txt

pip list pip install nltk

4. Deactivate Environment

Simply type deactivate to stop using python environment

Keep Learning , Keep Sharing … !!!

Originally published at http://learning-madeeasy.blogspot.com on December 2, 2022.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Shashi Vishwakarma
Shashi Vishwakarma

Written by Shashi Vishwakarma

Senior Software/AI Engineer , Technical Writer

No responses yet

Write a response