3

I checked out a SVN repository, and tried to python setup.py on my Ubuntu 10.04 terminal, which is a Python script, but I get the following error:

abc@def:~/Downloads/a-read-only$ python setup.py  
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: no commands supplied

I have no experience with Python, so any help I could get would be appreciated.

5 Answers 5

7

Try the following command:

python setup.py install
2

looks like you need to add a "cmd1".
to find out what that is, type

python setup.py --help
1

Well you could use terminal command to install python from Ubuntu. Try using:

sudo apt-get install python3

After Python has successfully installed. You could run the python terminal by typing 'python3' into the terminal and check if the command works. Or you could run the python scripts using:

python3 myfile.py
0

This can happen if you have a script called setup.py in your project (which clashes with the python setup.py install command), and you are importing it in the script you are trying to run.

Rename it, and your project should run fine (if that was the cause of the error).

0

setup.py can also contain calls to setup() with a script_args argument:

from setuptools import setup, Extension

setup(ext_modules = [Extension(...)],
      script_args = ['build_ext'])

Although not clearly stated here https://setuptools.pypa.io/en/latest/deprecated/distutils/apiref.html, the build_ext command runs with:

$ python setup.py

without supplying a command to setup.py.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .