Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66468
| References | <3a3acbf3-a7a5-4a5f-9e6c-10b4640be17f@googlegroups.com> |
|---|---|
| From | Fabio Zadrozny <fabiofz@gmail.com> |
| Date | 2014-02-15 16:25 -0200 |
| Subject | Re: Problem importing libraries installed with PIP in Eclipse |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7015.1392488743.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On Fri, Feb 14, 2014 at 1:30 AM, Renato <rvernucio@gmail.com> wrote: > 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: > > >>> import numpy # installed from repositories > >>> from numpy import array > >>> import pybrain # installed via PIP > >>> from pybrain import Network > >>> > > 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: > > import numpy # no errors (installed > from repositories) > from numpy import array # no errors > import pybrain # no errors (installed > via PIP) > from pybrain import Network # gives the error below > > Traceback (most recent call last): > File "/media/arquivos/pybrain_import_test.py", line 4, in <module> > from pybrain import Network > ImportError: cannot import name Network > > I suspected it could be related to virtualenv, but here is a print screen ( > http://imageshack.com/a/img534/4307/3x0m.png) 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? > -- > https://mail.python.org/mailman/listinfo/python-list > Hi Renato, Can you do the following: Create a new script with: import sys print '\n'.join(sorted(sys.path)) And let me know if the paths you have listed in both are equal... Also, which version of PyDev are you using? Cheers, Fabio
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Problem importing libraries installed with PIP in Eclipse Renato <rvernucio@gmail.com> - 2014-02-13 19:30 -0800
Re: Problem importing libraries installed with PIP in Eclipse Fabio Zadrozny <fabiofz@gmail.com> - 2014-02-15 16:25 -0200
Re: Problem importing libraries installed with PIP in Eclipse Renato <rvernucio@gmail.com> - 2014-02-16 04:59 -0800
Re: Problem importing libraries installed with PIP in Eclipse Renato <rvernucio@gmail.com> - 2014-02-16 06:52 -0800
Re: Problem importing libraries installed with PIP in Eclipse Fabio Zadrozny <fabiofz@gmail.com> - 2014-02-17 16:07 -0300
Re: Problem importing libraries installed with PIP in Eclipse Renato Vernucio <rvernucio@gmail.com> - 2014-02-17 16:20 -0300
csiph-web