This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chba
Recipients Arfrever, Trundle, barry, brett.cannon, chba, eric.smith, eric.snow, jcea, jkloth, lemburg, loewis, meador.inge
Date 2014-03-25.16:47:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> To test what I asked for, please run freeze on this script:
> """
> import _psycopg2
> print ('Works.')
> """

$ xxx/
$ make
$ ./hello
Traceback (most recent call last):
  File "", line 3, in <module>
    import _psycopg2
  File "/usr/lib/python3.4/importlib/", line 2214, in _find_and_load
    return _find_and_load_unlocked(name, import_)
  File "/usr/lib/python3.4/importlib/", 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.

Date User Action Args
2014-03-25 16:47:36chbasetrecipients: + chba, lemburg, loewis, barry, brett.cannon, jcea, eric.smith, jkloth, Arfrever, Trundle, meador.inge, eric.snow
2014-03-25 16:47:36chbasetmessageid: <>
2014-03-25 16:47:36chbalinkissue16047 messages
2014-03-25 16:47:36chbacreate