I have to work with Python 2.7

I have a old project need to work using python 2.7 and django 1.11. in this project how to create environment . there is no lib and scripts folder

I’d install the latest Python 2.7 if it isn’t already present. Then make
a virtualenv (you may need to install “virtualenv” too - it isn’t built
into Python 2) and install Django 1.11 in the virtualenv.

Typically you’d put the virtualenv as the “venv” subdirectory of the
project work area, at least for development.

Something like (untested):

cd project-work-area
virtualenv -p /usr/bin/python2 --system-site-packages venv
./venv/bin/pip install django=1.11

Then ensure that project-work-area/venv/bin is in the execution path for
your development environment, ahead of the system python.

Adjust “/usr/bin/python2” above to the location of your Python 2.7
executable - that specifies the underlying Python which is used by the
venv. Executing “project-work-area/venv/bin/python” runs the desired
Python with whatever is installed in the venv. Running
“project-work-area/venv/bin/pip” installs packages in the venv.

Cameron Simpson cs@cskk.id.au