"SyntaxError: invalid syntax" in Python
Question: I have installed odoo in my server that has Python 2.7.9. When I try to launch
the daemon, I get this error:

    
    
    root@des [/opt/odoo/openerp]# /etc/init.d/odoo start
    Starting Odoo Server Daemon (odoo-server):                 [  OK  ]
    root@des [/opt/odoo/openerp]# 'import site' failed; use -v for traceback
    Traceback (most recent call last):
      File "/opt/odoo/openerp-server", line 2, in ?
        import openerp
      File "/opt/odoo/openerp/__init__.py", line 90
        from . import models
             ^
    SyntaxError: invalid syntax
    

This is Python information:

    
    
    root@des [/opt/odoo/openerp]# python
    Python 2.7.9 (default, Apr  2 2015, 20:06:47)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    

And this is my environment:

    
    
    root@des [/opt/odoo/openerp]# uname -a
    Linux des.desytec.com 2.6.32-042stab104.1 #1 SMP Thu Jan 29 12:58:41 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
    

EDIT:

Thanks to Tevfik answer, I have solved the error, however, now a syntax error
is produced in Python libraries. How is this possible and hot can I solve it?

    
    
    root@des [/usr/local/lib/python2.7]# /etc/init.d/odoo start
    Starting Odoo Server Daemon (odoo-server):                 [  OK  ]
    root@des [/usr/local/lib/python2.7]# 'import site' failed; use -v for traceback
    Traceback (most recent call last):
      File "/opt/odoo/openerp-server", line 2, in ?
        import openerp
      File "/opt/odoo/openerp/__init__.py", line 47, in ?
        import os
      File "/usr/local/lib/python2.7/os.py", line 49, in ?
        import posixpath as path
      File "/usr/local/lib/python2.7/posixpath.py", line 339
        slash, dot = (u'/', u'.') if isinstance(path, _unicode) else ('/', '.')
                                   ^
    SyntaxError: invalid syntax
    
    root@des [/usr/local/lib/python2.7]#
    

Any help will be appreciated Thanks

Jaime


Answer: try this syntax

    
    
    from «app_name».models import *
    

