TheDarkTurtle
TheDarkTurtle

Reputation: 413

Installing External Python Module using Command Line - No Command Supplied

I am trying to install a python module manually without pip or easy_install in Python 3. At first I tried (after cd to the folder containing the setup.py file):

python setup.py install

However, I recieved an error:

'python' is not recognized as an internal or external command, operable program or batch file.

After a little research, I realised that without the python it should work:

setup.py install

This also gave me an error:

error: no command supplied

More researching told me to go back to python setup.py install (which doesn't work), and following these instructions and following links hasn't worked either.

I would appreciate any help in installing this module (the module being BeautifulSoup4).

Upvotes: 0

Views: 1807

Answers (1)

AKX
AKX

Reputation: 169368

This probably means your python.exe is not in your PATH.

Invoking setup.py directly works because of Windows' file associations.

The Python manual actually has an entry on how to set up your PATH, but its instructions are for Windows < 7, so here goes:

  1. Hit Windows+PAUSE to bring up the System Properties dialog.
  2. Click Advanced System Settings.
  3. Click Environment Variables.
  4. Add ;C:\Python3;C:\Python3\Scripts (or wherever your Python is) to the PATH environment variable (preferably in the System variables section). It's handy to have the Scripts directory in there too, to be able to easily run pip and other scripts.
  5. OK out through all the dialog boxes.
  6. Open a new command prompt (PATH changes do not always propagate automatically into open command prompts).
  7. Try python. Should work.

Upvotes: 2

Related Questions