Django and virtual environment things

How to make a virtual environment with venv

when I tried to do some things with Django and python, I was very hard to manage many python libs and handling of dependency problems at local environment

So I started to make a virtual environment with venv , Itโ€™s definitely more comfortable and easy to do somethings with Django and python

Today Let me explain some python, django shortcuts


Creation a virtual environment

python3 -m venv ./myenv

Activate a virtual environment

source myenv/bin/activate

Deactivate a virtual environment


Install PIP

python3 -m pip install --upgrade pip

Install Django (Latest Official )

pip install Django==3.1.7

Stop Django Local Server


Errorcase If you see the log below

That port is already in use Case(MAC OS)

sudo lsof -t -i tcp:8000 | xargs kill -9



What is the Cocoapods?

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects It has over 79 thousand libraries and is used in over 3 million apps

How to install Cocopods?

CocoaPods is built with Ruby and is installable with the default Ruby available on macOS. We recommend you use the default ruby

Using the default Ruby install can require you to use sudo when installing gems. Further installation instructions are in the guides

$ sudo gem install cocoapods

Cocopods advantages?

It is very useful for Dependency management and easy to use 3rd Party Libs

It has the advantage of maintenance

For more details, please refer to the link below.