0

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).

Community
  • 1
  • 1
TheDarkTurtle
  • 413
  • 1
  • 3
  • 12
  • command is like `python,` not `Python.` Please correct it – Bhavesh Odedra Jul 23 '14 at 10:18
  • why are you not using pip? – Padraic Cunningham Jul 23 '14 at 10:24
  • @Odedra I still get the same problem. Updating the question now. – TheDarkTurtle Jul 23 '14 at 10:27
  • windows is case insensitive so uppercase would not matter, do you have a `C://Python3` directory – Padraic Cunningham Jul 23 '14 at 10:29
  • @PadraicCunningham I've tried using pip and it doesn't seem like it has been bundled with my version of Python. Using Pip in Python Command Line gives me `invalid syntax` (I assume I have to use it in _Python_ command line?) – TheDarkTurtle Jul 23 '14 at 10:32
  • what error are you getting, also if you are trying to install a python 3 package you would have to use the python3 interpreter with the setup.py script – Padraic Cunningham Jul 23 '14 at 10:33
  • @PadraicCunningham do you mean to run it in the Python Shell that comes with IDLE? Right now I've tried using Run.exe (just running the setup.py) and Command Line (as above). I don't have a `C://Python3` directory, the closest is `C:\Python34`, which is what I have been using. – TheDarkTurtle Jul 23 '14 at 10:39
  • No I meant if you have python2.7 and 3.4 installed you will have to specify the correct interpreter . C:\Python34 is fine I just wanted to make sure you had some python 3 installed. Do you have `C:\Python34 ` in your PATH? – Padraic Cunningham Jul 23 '14 at 10:43

1 Answers1

2

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.
AKX
  • 152,115
  • 15
  • 115
  • 172