import sys<br>print sys.path # All directories where Python looks for packages<br clear="all"><div><br></div><div><br></div>- Gennadiy <<a href="mailto:gennad.zlobin@gmail.com" target="_blank">gennad.zlobin@gmail.com</a>><br>


<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 11:12 PM, John Gordon <span dir="ltr"><<a href="mailto:gordon@panix.com">gordon@panix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">In <<a href="mailto:mailman.66.1313506232.27778.python-list@python.org">mailman.66.1313506232.27778.python-list@python.org</a>> smith jack <<a href="mailto:thinke365@gmail.com">thinke365@gmail.com</a>> writes:<br>


<br>
> this package is already in the site-packages directory, but i cannot<br>
> import it , it's really confusing ...<br>
<br>
</div>Is it in the site-packages directory for the particular version of<br>
python you're using?<br>
<br>
For example, my system has both python2.3 and python2.5 installed, and<br>
they both have their own site-packages directories:<br>
<br>
/usr/lib/python2.3/site-packages<br>
/usr/lib/python2.5/site-packages<br>
<br>
A package installed for only one version of python won't be importable<br>
if you're running a different python version.<br>
<br>
(If you don't know which version you're running, the version number<br>
should be displayed when you start up a python shell, like this:<br>
<br>
  command prompt> python<br>
  Python 2.3.4 (#1, Apr 15 2011, 17:38:51)<br>
  [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2<br>
  Type "help", "copyright", "credits" or "license" for more information.<br>
  >>><br>
<font color="#888888"><br>
--<br>
John Gordon                   A is for Amy, who fell down the stairs<br>
<a href="mailto:gordon@panix.com">gordon@panix.com</a>              B is for Basil, assaulted by bears<br>
                                -- Edward Gorey, "The Gashlycrumb Tinies"<br>
</font><div><div></div><div class="h5"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>