[PyInstaller] Re: ImportError: No module named encodings

2007-02-15 Thread Artie


On Feb 13, 6:56 am, srx [EMAIL PROTECTED] wrote:
 Artie wrote:
  On Feb 12, 12:35 pm, srx [EMAIL PROTECTED] wrote:
   Artie wrote:
On Feb 6, 8:23 am, Artie [EMAIL PROTECTED] wrote:
 I'm back with another issue that I couldn't resolve :-) !  I'm not
 trying to annoy... really... I'm not.

 In my python script:

 import encodings
 from encodings import *
 import encodings.cp1252
 import encodings.idna
 import encodings.hex_codec
 import encodings.latin_1
 import encodings.utf_8
 import encodings.utf_16
 import encodings.utf_16_le
 import encodings.ascii

 After built with pyinstaller (svn rev 306), I run my program and
 receive the error:

 Traceback (most recent call last):
   File string, line 3, in ?
   File /home/ueoff/Desktop/pyinstaller/iu.py, line 334, in
 importHook
 raise ImportError, No module named %s % fqname
 ImportError: No module named encodings

 Any suggestions?

 --Artie

This is the only warning about encodings generated during build:
W: delayed  __import__ hack detected at line 0 - encodings (/usr/lib64/
python2.4/encodings/__init__.pyo)

   I have the same problem, with (and only with) OpenGL.
   If I do not use encodings then it can't find another module.
   When I don't use OpenGL it is just fine, so I think it has something
   to do with OpenGL.
   If anyone can help us with this, please.

   Sorry, English is not my native language.- Hide quoted text -

   - Show quoted text -

  I am using PyOpenGL as well...

 Hi Artie, again sorry for my bad English. I am using PyOpenGL as well...

 Yes, me to.
 I am not sure, but I think that PyOpenGL use Python C/API to do the
 import and pyinstaller can't detect everything. So we need some kind
 of hooks.
 I use pyinstaller for a long time and never had any problems till now.
 And only difference was PyOpenGL.
 Try to build a simple script, let's say:
 #! /usr/bin/python

 print Hi, all   # just for fun

 then try same script with PyOpenGL:
 #! /usr/bin/python
 from OpenGL.GL import *
 print Hi, all   # just for fun

 I can't really try that now, because I not at home, but I think it
 will generate same (or similar) error.
 In my project when I comment lines starting with:
 from OpenGL.GL import *
 from OpenGL.GLU import *
 from OpenGL.GLUT import *
 everythink is just fine.

 I don't know, should we file a bug report or something.

Well, I think this thread is the bug report...  The maintainers of
pyinstaller seem to regularly respond to these threads; and hopefully
they will soon.  I know that there is a way for these types of
installers to deal with these kinds of issues; py2app, py2exe, and
cx_Freeze don't have any problems doing it.  And you might ask... why
not use those instead?.  Well I do, but their options are limited and
require a little more setup on your end.  That is why I am evaluating
pyinstaller and I think it has some potential... and hopefully using
PyOpenGL in your project does not render pyinstaller useless in the
future.  But, until then, it is useless to me.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to PyInstaller@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~--~~~~--~~--~--~---



[PyInstaller] Re: ImportError: No module named encodings

2007-02-13 Thread Artie



On Feb 12, 12:35 pm, srx [EMAIL PROTECTED] wrote:
 Artie wrote:
  On Feb 6, 8:23 am, Artie [EMAIL PROTECTED] wrote:
   I'm back with another issue that I couldn't resolve :-) !  I'm not
   trying to annoy... really... I'm not.

   In my python script:

   import encodings
   from encodings import *
   import encodings.cp1252
   import encodings.idna
   import encodings.hex_codec
   import encodings.latin_1
   import encodings.utf_8
   import encodings.utf_16
   import encodings.utf_16_le
   import encodings.ascii

   After built with pyinstaller (svn rev 306), I run my program and
   receive the error:

   Traceback (most recent call last):
 File string, line 3, in ?
 File /home/ueoff/Desktop/pyinstaller/iu.py, line 334, in
   importHook
   raise ImportError, No module named %s % fqname
   ImportError: No module named encodings

   Any suggestions?

   --Artie

  This is the only warning about encodings generated during build:
  W: delayed  __import__ hack detected at line 0 - encodings (/usr/lib64/
  python2.4/encodings/__init__.pyo)

 I have the same problem, with (and only with) OpenGL.
 If I do not use encodings then it can't find another module.
 When I don't use OpenGL it is just fine, so I think it has something
 to do with OpenGL.
 If anyone can help us with this, please.

 Sorry, English is not my native language.- Hide quoted text -

 - Show quoted text -

I am using PyOpenGL as well...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to PyInstaller@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~--~~~~--~~--~--~---



[PyInstaller] Re: PyOpenGL generates Build error

2007-02-06 Thread Artie



On Feb 5, 4:48 pm, Giovanni Bajo [EMAIL PROTECTED] wrote:
 On 05/02/2007 23.16, Artie wrote:

  I am using PyInstaller 1.3.  My python program uses PyOpenGL.  I have
  PyOpenGL version 2.0.2.01 installed.  My os is Linux.  When I run the
  Build.py script on my program, I get this error:

 The problem is that __init__.py contains DOS line endings (\r\n). This does
 not seem to affect normal execution with Python, but confuses PyInstaller. In
 fact, it is even documented that compile() does not accept \r\n line 
 endings.

 I have just committed the attached patch as r306. Can you get it off SVN trunk
 and verify it fixes the problem for you?

 Thanks!
 --
 Giovanni Bajo

  linux_crlf.patch
 1KDownload

Yes, this fixes the problem.  Thank you very much.
--Artie


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to PyInstaller@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~--~~~~--~~--~--~---



[PyInstaller] Re: ImportError: No module named encodings

2007-02-06 Thread Artie



On Feb 6, 8:23 am, Artie [EMAIL PROTECTED] wrote:
 I'm back with another issue that I couldn't resolve :-) !  I'm not
 trying to annoy... really... I'm not.

 In my python script:

 import encodings
 from encodings import *
 import encodings.cp1252
 import encodings.idna
 import encodings.hex_codec
 import encodings.latin_1
 import encodings.utf_8
 import encodings.utf_16
 import encodings.utf_16_le
 import encodings.ascii

 After built with pyinstaller (svn rev 306), I run my program and
 receive the error:

 Traceback (most recent call last):
   File string, line 3, in ?
   File /home/ueoff/Desktop/pyinstaller/iu.py, line 334, in
 importHook
 raise ImportError, No module named %s % fqname
 ImportError: No module named encodings

 Any suggestions?

 --Artie

This is the only warning about encodings generated during build:
W: delayed  __import__ hack detected at line 0 - encodings (/usr/lib64/
python2.4/encodings/__init__.pyo)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to PyInstaller@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~--~~~~--~~--~--~---



[PyInstaller] PyOpenGL generates Build error

2007-02-05 Thread Artie

I am using PyInstaller 1.3.  My python program uses PyOpenGL.  I have
PyOpenGL version 2.0.2.01 installed.  My os is Linux.  When I run the
Build.py script on my program, I get this error:

Syntax error in /usr/lib64/python2.4/site-packages/OpenGL/__init__.py
('invalid syntax', ('/usr/lib64/python2.4/site-packages/OpenGL/
__init__.py', 2, 28, if __name__ == '__build__':\r\n))
Traceback (most recent call last):
  File Build.py, line 839, in ?
build(sys.argv[1])
  File Build.py, line 76, in build
exec open(spec, 'r').read()+'\n'
  File string, line 2, in ?
  File Build.py, line 112, in __init__
self.__postinit__()
  File Build.py, line 94, in __postinit__
self.assemble()
  File Build.py, line 182, in assemble
analyzer.analyze_script(script)
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 379, in
analyze_script
return self.analyze_r('__main__')
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 299, in
analyze_r
newnms = self.analyze_one(name, nm, imptyp)
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 333, in
analyze_one
mod = self.doimport(nm, ctx, fqname)
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 400, in
doimport
mod = director.getmod(nm)
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 216, in
getmod
mod = owner.getmod(nm)
  File /home/ueoff/Desktop/pyinstaller-1.3/mf.py, line 71, in getmod
co = compile(open(py[0], 'r').read()+'\n', py[0], 'exec')
  File /usr/lib64/python2.4/site-packages/OpenGL/__init__.py, line 2
if __name__ == '__build__':
   ^
SyntaxError: invalid syntax

Any suggestions on how to fix this problem?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
PyInstaller group.
To post to this group, send email to PyInstaller@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~--~~~~--~~--~--~---