Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: invalid command 'bdist_egg'

I am running:

Ubuntu 13.04

Python 2.7.4

I am trying this very simple tutorial on making a python egg, but am having difficulties when I actually try to run the command to make the egg.

    <me>@<compname>:~/Desktop/SANDBOX/somedir$ python setup.py bdist_egg
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

    error: invalid command 'bdist_egg'

What I know so far: When I enter the command,

    $ python setup.py --help-commands

I get back all the normal commands, but not the "extra commands". I have tried googling and searching Stack Overflow but have yet to yield any useful results. I understand I am most likely missing a dependency but I had believed I installed all required parts to make this work.

Any insight is much appreciated. Thanks.

like image 279
LastTigerEyes Avatar asked Aug 26 '13 19:08

LastTigerEyes


2 Answers

bdist_egg is a command supplied by setuptools. Make sure you import from that project in setup.py, not from distutils:

from setuptools import setup

The tutorial does tell you to do this, but it appears you missed that part.

like image 182
Martijn Pieters Avatar answered Sep 27 '22 23:09

Martijn Pieters


I had a similar issue then I realized that I need too install the setuptools first, oops:

Setup Tools Installation Instructions

like image 38
Human Avatar answered Sep 28 '22 00:09

Human