views:

120

answers:

2

I tried to install beautifulsoup. I get such an error:
<-- snip --> raise MissingSectionHeaderError(fpname, lineno, line) ConfigParser.MissingSectionHeaderError: File contains no section headers. file: /Users/Sam/.pydistutils.cfg, line: 1 'install_lib = ~/Library/Python/$py_version_short/site-packages\n'

I get an similar error as I run my Python code in vim by: :!python %

+6  A: 

You can test if a module is installed like so:

$ python
>>> import modulename
defrex
+1  A: 

I'd try the following:

  1. Open Python shell
  2. Type import <moduleName>
  3. Parse the results (no error, ImportError or some module loading error)
  4. Try to invoke any function from imported module (to see if module is correctly initialized).

Do you need something more sophisticated?

Abgan