error: invalid command 'bdist_egg'
Asked Answered
I

2

12

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.

Imprison answered 26/8, 2013 at 19:44 Comment(0)
B
15

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.

Bouffard answered 26/8, 2013 at 20:20 Comment(2)
You are absolutely correct. I had the line "from distutils.core import setup" by mistake, still leftover from the previous example they had. Many thanks.Imprison
The setup.py provided with pycrypto 2.6.1 did not have bdist_egg as a command. Adding the import line as above worked and I could build the egg file for it.Loraine
H
3

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

Setup Tools Installation Instructions

Heady answered 6/2, 2014 at 5:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.