Christian Bachmaier added the comment:

> To test what I asked for, please run freeze on this script:
> 
> """
> import _psycopg2
> print ('Works.')
> """

$ xxx/freeze.py hello.py
$ make
$ ./hello
Traceback (most recent call last):
  File "hello.py", line 3, in <module>
    import _psycopg2
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2214, in 
_find_and_load
    return _find_and_load_unlocked(name, import_)
  File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2201, in 
_find_and_load_unlocked
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_psycopg2'

Btw the same with import psycopg2, psycopg2._psycopg, or _psycopg. Event with 
the subdir link as explained above. The first one (import psycopg2) is the one 
which operates in interpretation mode.

> If it prints 'Works.', then your problem is unrelated to this
> ticket.

Nop, prints the error message instead of 'Works.'

> If it fails with an import error or some other error
> related to loading the shared lib, then it may be a problem
> with freeze and is likely related to the new import lib
> machinery.

=> we have a bug if Marc-Andre is right. Thanks.

Chris

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16047>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to