<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 1:30 AM, Renato <span dir="ltr"><<a href="mailto:rvernucio@gmail.com" target="_blank">rvernucio@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi guys, I'm using Python 2.7.5 64 bits and I have a problem when importing libraries that were installed via PIP when importing them inside Eclipse (version 4.3.1). Outside Eclipse (directly in Python's shell) everything works fine, here is an example:<br>


<br>
>>> import numpy                             # installed from repositories<br>
>>> from numpy import array<br>
>>> import pybrain                           # installed via PIP<br>
>>> from pybrain import Network<br>
>>><br>
<br>
Everything works outside Eclipse. But inside Eclipse I can't import libraries installed via PIP using "from x import y" format, it will give an error. The only way I can import libraries installed via PIP is using "import x" format. Here is an example:<br>


<br>
import numpy                                     # no errors (installed from repositories)<br>
from numpy import array                          # no errors<br>
import pybrain                                   # no errors (installed via PIP)<br>
from pybrain import Network                      # gives the error below<br>
<br>
Traceback (most recent call last):<br>
  File "/media/arquivos/pybrain_import_test.py", line 4, in <module><br>
    from pybrain import Network<br>
ImportError: cannot import name Network<br>
<br>
I suspected it could be related to virtualenv, but here is a print screen (<a href="http://imageshack.com/a/img534/4307/3x0m.png" target="_blank">http://imageshack.com/a/img534/4307/3x0m.png</a>) of my Python's PATH. The directory /usr/lib/python2.7/site-packages where PyBrain is installed is already in Python's PATH inside Eclipse. Could someone help me, please?<br>


<span class=""><font color="#888888">--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Hi Renato,<div><br></div><div>Can you do the following:</div><div><br></div><div>Create a new script with:</div><div><br></div><div>import sys</div><div>

print '\n'.join(sorted(sys.path))</div><div><br></div><div>And let me know if the paths you have listed in both are equal... Also, which version of PyDev are you using?</div><div><br></div><div>Cheers,</div><div>
<br>
</div><div>Fabio</div></div><div class="gmail_extra"><br></div></div>