How to Set Up Environment for Python Development?
Set Up Environment for Python Development

The simple way to set the new environment for development in Python.
Here are the general steps to set up the environment for development:
- Install python
- Create project Directory
- Create a Python Virtual Environment
- Install library in our environment
Detail Steps:
Setting up a virtual environment for development is so important.
1. Installing Python
If you don’t have Python programming language in your system, you must download and install it or you can use Pycharm for development.
2. Creating Project Directory
To create a project directory with bash, you must open a terminal or cmd in Windows. Then write code like this:
# for Windows
md new_project
cd new_project# for Mac OS and Linux
mkdir new_project
cd new_project3. Creating a Python Virtual Environment
Here is the code for creating a Python virtual environment for Windows OS
# Windows
# Create the environment
python -m venv venv# Activate the environment
.\venv\Scripts\activate.batIf your OS is Linux, Ubuntu, or macOS you can use this code to create an environment:
# macOS or Linux
# Create the environment
python -m venv venv# Activate the environment
source ./venv/bin/activate4. Install the library in our environment
To install the library you needed to follow this code to run in the command line. Before that, you need to write requirements.txt with the content for example like this:
APScheduler==3.6.3
cachetools==4.2.2
certifi==2023.7.22
pydub==0.25.1
python-telegram-bot==13.7
pytube==15.0.0
pytz==2023.3.post1
six==1.16.0
tornado==6.3.3
tzlocal==5.0.1Then run the library with the command like in below.
pip install -r requirements.txtAfter you follow all the steps. You are successful in setting up your new environment for Python development. Happy Learning!
