Python module installed by issues while importing on Mac OS
<p>I installed <code>beautifulsoup4</code> module in <code>python2.7</code>, but import is failing.</p>

<p>python module is installed under this directory.</p>

<pre><code>$ls -l /Library/Python/2.7/site-packages
total 1080
-rw-r--r--   1 root  wheel     119 Aug 22  2015 README
drwxr-xr-x   9 root  wheel     306 Sep  8 22:17 beautifulsoup4-4.5.1.dist-info
drwxr-xr-x  14 root  wheel     476 Sep  8 22:17 bs4
-rw-r--r--   1 root  wheel      30 Sep  8 22:03 easy-install.pth
drwxr-xr-x  34 root  wheel    1156 Sep  8 22:16 pip
drwxr-xr-x  10 root  wheel     340 Sep  8 22:16 pip-8.1.2.dist-info
-rw-r--r--   1 root  wheel  538338 Sep  8 22:03 setuptools-26.1.1-py2.7.egg
-rw-r--r--   1 root  wheel      30 Sep  8 22:03 setuptools.pth
drwxr-xr-x   6 root  wheel     204 Jul 26 21:13 vboxapi
-rw-r--r--   1 root  wheel     241 Jul 26 21:13 vboxapi-1.0-py2.7.egg-info
drwxr-xr-x  32 root  wheel    1088 Sep  8 22:16 wheel
drwxr-xr-x  11 root  wheel     374 Sep  8 22:16 wheel-0.29.0.dist-info
$
</code></pre>

<p>output of python shell, import fails. I am using python2.7</p>

<pre><code>$ /usr/bin/python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import beautifulsoup4
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ImportError: No module named beautifulsoup4
&gt;&gt;&gt; exit()
</code></pre>

<p>python <code>sys.path</code> has module location as <code>/Library/Python/2.7/site-packages</code></p>

<pre><code>$ /usr/bin/python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import sys
&gt;&gt;&gt; print "\n".join(sys.path)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
/Library/Python/2.7/site-packages
/Library/Python/2.7/site-packages/setuptools-26.1.1-py2.7.egg
&gt;&gt;&gt; exit()
$
</code></pre>

<p>please suggest why import of module is failing.</p>

<p>Thanks</p>

<p>Try this:</p>

<pre><code> from bs4 import BeautifulSoup
</code></pre>

python osx python-2.7