Q:

Management command not found without unzipping .egg

I have a django app that I've packaged according to the docs here:  https://docs.djangoproject.com/en/1.5/intro/reusable-apps/
I installed the app into a virtual environment using setup.py.
./setup.py install

The app's web UI runs fine from the virtual environment.  But I cannot access the custom management command with this vanilla install.
(django_grm)[grm@controller django_grm]$ python ./manage.py sync_to_graphite
Unknown command: 'sync_to_graphite'

Here's what the virtual environment looks like when the command will not execute:
(django_grm)[grm@controller django_grm]$ ll /home/grm/venv/django_grm/lib/python2.7/site-packages
total 1148
...
-rw-rw-r--  1 grm grm 243962 Jun 19 17:11 django_grm-0.0.4-py2.7.egg
...

However, once I unzip the .egg file, the management command works as expected.
(django_grm)[grm@controller django_grm]$ cd /home/grm/venv/django_grm/lib/python2.7/site-packages
(django_grm)[grm@controller site-packages]$ unzip django_grm-0.0.4-py2.7.egg 

(django_grm)[grm@controller site-packages]$ ll /home/grm/venv/django_grm/lib/python2.7/site-packages
total 1152
...
-rw-rw-r--  1 grm grm 243962 Jun 19 17:11 django_grm-0.0.4-py2.7.egg
drwxrwxr-x  6 grm grm   4096 Jun 19 17:16 dj_grm
...

(django_grm)[grm@controller site-packages]$ cd /home/grm/django_projects/django_grm/
(django_grm)[grm@controller django_grm]$ python ./manage.py sync_to_graphite

<success>

Is this normal behaviour?  It feels wonky.

A:

I strongly suggest using pip instead of setup.py. It tends to do a much better job of installing packages as well as managing them.
Once you have your virtual environment in place, it would be:
$ . env/bin/activate
$ pip install [APP_NAME]

This installs a non-zipped version of the app in the virtual environment.
If the app is a zip from somewhere, you can still use pip
$ pip install http://[URL_TO_ZIP]

