Search code examples
pythondjangoegg

How to install a python egg using a downloaded GIT repository


I have a python Django project running inside a virtual environment.

I need to migrate that project to another server. To setup a new virtual environment inside that server I need to install a dependency from git(personal GIT server) as a python egg.

To connect to the git server it is required to connect via VPN. However, I couldn't configure a VPN client in the new server.

But I have the GIT repository which is needed to be installed as an egg.

Someone please advice me on how to install the downloaded GIT repository as an egg.

This is the line I used to install the dependency from GIT as an egg.

-e [email protected]:testsourcing/test-project.git#egg=test

Since I have the downloaded repository, Is there a way to install the egg from the project directory.

I am using Django 1.5.7 and python 2.7.14


Solution

  • Following command, successfully worked in the Django 1.5.7 and python 2.7.14 inside Linux environment.

    Go to the python virtual environment. Then run the following command.

    pip install -e file:///[path to the checkout]#egg=[name for the egg] 
    

    Eg:

    pip install -e file:///home/john/site/apps/testapp-test#egg=test