Creating Python Eggs from NetBeans

This page reflects the work performed on Issue/Task #150283 which sought to enable creating Python eggs from NetBeans IDE for Python



Create Python Egg from within NetBeans.

Use case in NetBeans

  • Right-click on the Python project name and select 'Build Egg'
  • A Python Egg should be created and deposited in a new sub-directory -'dist' with a default '' which will be opened for the user to customise
  • Clean and Build Egg should be available


  • If you already have a '' file, and a do a 'Build Egg' it uses that. (Do a 'Clean & Build Egg' to create a default file)
  • The process can be tracked in the 'Output' TAB:


  • Once the build process is over, you will see the the 'egg' has been deposited in the 'dist' directory (accessible in the 'Files' View)


It is not viewable from the 'Projects' view as it unnecessarily clutters the view.

Egg Formats

As you can see from the above view, there is also a file, EggDemo.egg-info, which is another format for Python Eggs as mentioned in


These have to assumed, because that is the way it has to be:

  • You have setuptools installed
  • Your file lives in the top level directory- src or your existing sources' root directory
  • Your packages or sub-packages (those containing are actually in the sub-(sub)-directories under your top-level directory, in which lives


Creating Python eggs:

Basically Python eggs are created via a 4-step process

  1. Install setuptools.
  2. Create the files you want to be in your egg.
  3. Create a file.
  4. Run: python bdist_egg

For example:

$ cd /tmp
$ mkdir egg-example
$ cd egg-example
$ touch

In this case, it will only contain an empty Python module named ''.

Next, create the simplest possible file:

from setuptools import setup, find_packages
    name = "HelloWorld",
    version = "0.1",
    packages = find_packages(),
python bdist_egg

Your Python egg should be ready in a new directory- dist


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo