3

Is Python 3.7.0 supported with cx_Freeze 6.0b1 (latest version)? I just created a simple project and it works with Python 3.5.4 but it does not in Python 3.7.0 where it shows:

Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

I've reported this upstream as #399.

jpeg
  • 2,372
  • 4
  • 18
  • 31
user1618465
  • 1,813
  • 2
  • 32
  • 58
  • Are you the same person who created [issue #399](https://github.com/anthony-tuininga/cx_Freeze/issues/399). If not, you should add that issue to your watch, but since it's only an hour old and has no replies yet, it won't answer your question or help you in any other way yet. – abarnert Jul 12 '18 at 20:49
  • Anyway, `cx_Freeze` has had some similar bugs in the past with new Python versions. For example, IIRC, whenever `zipimport` was first added, it would freeze in `zipimport` and `ziplib`, but not freeze in `zlib` unless you used it directly somewhere in your code, so you got a very similar error, and that wasn't fixed until a couple weeks after the Python release. – abarnert Jul 12 '18 at 20:52
  • Hi, yes, that question was mine. Let's see if they fix it. Thanks – user1618465 Jul 13 '18 at 17:57
  • You should put information like that in your question. (I edited it in for you.) Otherwise, you're liable to get people writing things like "This is a known bug: see #399". That obviously isn't very helpful if it's not "known" to anyone but you, because you just filed #399 a few minutes ago, but it's hard for someone to tell that's what's happened. – abarnert Jul 13 '18 at 18:24
  • Possible duplicate of [What could be the reason for fatal python error:initfsencoding:unable to load the file system codec?](https://stackoverflow.com/questions/51183280/what-could-be-the-reason-for-fatal-python-errorinitfsencodingunable-to-load-th) – jpeg Oct 15 '18 at 18:40

1 Answers1

3

The fix for this bug exists: pull request 395: Compilation correct .pyc files for Python 3.7.0. You can apply it by hand to your existing installation.

totaam
  • 1,306
  • 14
  • 25