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 

deactivate


Keep Learning , Keep Sharing ... !!!

Comments

Popular posts from this blog

JDBC Hive Connection fails : Unable to read HiveServer2 uri from ZooKeeper

Access Kubernetes ConfigMap in Spring Boot Application

Developing Custom Processor in Apache Nifi