0

Answer marked below. It was two problems. I was missing a semicolon in the env var path, and the latest Beautiful Soup is incompatible with my python script. Using an older version allowed it to run.

I'm trying to install Beautiful Soup in Windows using "Setup.py Install" from a CMD window.

I get the below error...

Z:\Installers\beautifulsoup4-4.1.0>setup.py install
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

Z:\Installers\beautifulsoup4-4.1.0>

I have seen this post and this post, however, running the command above does attempt the install, leading me to believe python is at least partially set up correctly in environment variables. The 'python' command itself in a cmd is "not recognised" and neither is "easy_install". Making me think something is wrong somewhere. I have set these both as... C:\Python27\C:\Python27\Scripts

Does anyone know what might be causing my Beautiful Soup install to fail using easy_install or Setup.py?

Edit: C:\Path\To\Python27\python "C:\Path\To\BeautifulSoup\setup.py" install worked. So I'm not sure what is wrong with my path variable.

Edit 2: While the install appeared to work I'm still being told beautiful soup is not installed. Import Error: No module named BeautifulSoup.

Community
  • 1
  • 1
square_eyes
  • 1,269
  • 3
  • 22
  • 52
  • Yeah that's my point. Installing as `setup.py install` has been working for other modules and starts working with beautiful soup, then fails. See my edit above, it works with the direct path. So I'm not sure why my env variable path isn't having effect (I have restarted since). Edit: the prev comment seems to have been removed. – square_eyes Jun 20 '14 at 03:55
  • Does `echo %PATH%` contain the path to your Python install? – Peter Gibson Jun 20 '14 at 04:03
  • It does. One thing to note is that I installed Python 64 first before I realised my MySQL module was incompatible. Could it be that a pref file somewhere is still referencing the old install? I did uninstall it and delete the folder. – square_eyes Jun 20 '14 at 04:19
  • Why is there a space in the module name in the error message? Also your path above `C:\Python27\C:\Python27\Scripts` is missing a separator character - I believe windows uses semicolons – Peter Gibson Jun 20 '14 at 04:48
  • The space was a typo. I found a solution (it was two problems). See the answer below and my updated question. Thanks for the help! – square_eyes Jun 20 '14 at 17:53

1 Answers1

1

If python command itself is not recognized in the cmd then you should modify your systems environment variables to recoginze it. Here's how you do it. Go to My Computer ‣ Properties ‣ Advanced ‣ Environment Variables Modify the path variable and append ;C:\Python27\ . make sure paths are seperated with a ';' semicolon. After setting this up, make sure python is appended to the path using echo %PATH%, also typing python in cmd should launch the python shell

For installing beautiful soup you'll need to run

python setup.py install

Ashoka Lella
  • 6,631
  • 1
  • 30
  • 39