Hi Simon and thanks for your help.

I just tried what you said and it doesn't work!

What I did though (AND IT WORKED!) is that I have updated my OS (Ubuntu)
from 12.04 to 14.04 which has Python3 as default and I run my project with
it.


2014-08-18 10:31 GMT+01:00 Simon King <si...@simonking.org.uk>:

> I've never used PyDev, but if it effectively adds the folder that
> you've specified in that screenshot to PYTHONPATH, then I suspect that
> is the problem. What happens if you remove that "External Library",
> and try to run the following script:
>
>     import sqlalchemy
>     print sqlalchemy.__file__
>
> Simon
>
> On Sat, Aug 16, 2014 at 2:41 PM, Zakaria Boulouard <zboulou...@gmail.com>
> wrote:
> > Hello Michael and thanks for your help,
> >
> > If there is anyway to make it work in PyDev that would be great because I
> > want to integrate a similar code into a bigger project and PyDev would be
> > more suitable.
> >
> > I guess importing the SQLAlchemy lib was the way it should be, I even
> put it
> > as forced lib, you can check the attached picture.
> >
> > If it wouldn't bother you, I would like to invite you to take a look
> using
> > teamviewer and see what is going on.
> >
> > Thanks again!
> >
> >
> > 2014-08-16 13:25 GMT+01:00 Michael Bayer <mike...@zzzcomputing.com>:
> >>
> >> how are you running the script?   there’s an environmental issue that is
> >> causing SQLAlchemy to be imported improperly.
> >>
> >> This is probably some PyDev issue.   If you install SQLAlchemy in a
> >> virtualenv normally and run the script from the console it should be
> fine
> >> (runs over here OK).
> >>
> >>
> >>
> >> On Aug 16, 2014, at 4:13 AM, Zakaria Boulouard <zboulou...@gmail.com>
> >> wrote:
> >>
> >> Hello guys,
> >>
> >> I am new to SQLAlchemy and I wanted to try an example using a MySQL
> >> database and PyDev as an IDE but when I run it, PyDev gives me the
> following
> >> error :
> >>
> >>> Traceback (most recent call last):
> >>>   File "/usr/lib/python2.7/site.py", line 68, in <module>
> >>>     import os
> >>>   File "/usr/lib/python2.7/os.py", line 49, in <module>
> >>>     import posixpath as path
> >>>   File "/usr/lib/python2.7/posixpath.py", line 17, in <module>
> >>>     import warnings
> >>>   File "/usr/lib/python2.7/warnings.py", line 8, in <module>
> >>>     import types
> >>>   File
> >>>
> "/home/zakaria/Bureau/Python/SQLAlchemy-0.9.7/lib/sqlalchemy/types.py", line
> >>> 21, in <module>
> >>>     from .sql.type_api import (
> >>> ValueError: Attempted relative import in non-package
> >>
> >>
> >> What did I do wrong? And how can I fix it?
> >>
> >> Please find attached the test file "Personne.py" and thanks for your
> help!
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "sqlalchemy" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to sqlalchemy+unsubscr...@googlegroups.com.
> >>
> >> To post to this group, send email to sqlalchemy@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/sqlalchemy.
> >> For more options, visit https://groups.google.com/d/optout.
> >> <Personne.py>
> >>
> >>
> >> --
> >> You received this message because you are subscribed to a topic in the
> >> Google Groups "sqlalchemy" group.
> >> To unsubscribe from this topic, visit
> >> https://groups.google.com/d/topic/sqlalchemy/eJ2Z8QBAEzU/unsubscribe.
> >> To unsubscribe from this group and all its topics, send an email to
> >> sqlalchemy+unsubscr...@googlegroups.com.
> >>
> >> To post to this group, send email to sqlalchemy@googlegroups.com.
> >> Visit this group at http://groups.google.com/group/sqlalchemy.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> >
> > --
> > Zakaria BOULOUARD
> > Ingénieur d'État en Génie Informatique
> > École Nationale des Sciences Appliquées Khouribga
> > N° Téléphone: (+212)662193321 / (+212)668695440
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sqlalchemy" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to sqlalchemy+unsubscr...@googlegroups.com.
> > To post to this group, send email to sqlalchemy@googlegroups.com.
> > Visit this group at http://groups.google.com/group/sqlalchemy.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sqlalchemy" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sqlalchemy/eJ2Z8QBAEzU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Zakaria BOULOUARD
Ingénieur d'État en Génie Informatique
École Nationale des Sciences Appliquées Khouribga
N° Téléphone: (+212)662193321 / (+212)668695440

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to