Quico Va
Quico Va

Reputation: 39

py2app Modules not found during compile on OSX 10

Error while compiling a python script into an Mac app using py2app on (OS X 10.10) the compile runs until the end, but gives error msg.

setup scrip:

from setuptools import setup

APP = ['Main.py']
OPTIONS = {'iconfile':'LOGO.icns',}

setup(
    app = APP,
    options = {'py2app': OPTIONS},
    setup_requires = ['py2app'],
)

On the Main Script I'm only importing 3 modules:

import os
from tkFileDialog import askdirectory
from Tkinter import Tk

I run the setup script in the terminal, it creates the 2 folders (build and Dist) full of files but the app file inside Dist doesn't do anything, not even the error msg.

When I'm compiling I get this error right at the end, before "Done":

Modules not found (unconditional imports):
* main.requires (pdb)
* _weakref.CallableProxyType (_weakrefset)
*_weakref.ProxyType (_weakrefset)
* _weakref.ReferenceType (_weakrefset)
* _weakref.getweakrefcount (_weakrefset)
*_weakref.getweakrefs (_weakrefset)
* _weakref.proxy (_weakrefset)
* errno.EINVAL (os)
* errno.ENOENT (os)
* java.System (java.lang)
* nt._getfullpathname (os)
* nt._isdir (os)
* org (copy, org.python.core)
* org.PyStringMap (org.python)
* org.python (copy, pickle)
* org.python.core (pickle)
* org.python.core.PyStringMap (copy)
* pwd.getpwnam (getpass)
* sys.py3kwarning (os)
* thread._local (collections)
* thread.allocate_lock (collections)
* thread.stack_size (collections)
* urllib.parse (pkg_resources)

Modules not found (conditional imports):
* _md5 (hashlib)
* _sha (hashlib)
* importlib._bootstrap (pkg_resources)
* java (platform) * java.lang (platform)
* riscospath (os)

If I run the main script directly from the terminal the main script works.

Any ideias??

Upvotes: 1

Views: 1863

Answers (1)

fuzzycheck
fuzzycheck

Reputation: 11

it seems to be caused by a too long path.

My application is in a path 61 chars long:
$ pwd|wc -c
      61

and I get this error:

Modules not found (conditional imports): * importlib._bootstrap (pkg_resources)

And the build works if I remove a few characters to the path:

$ pwd|wc -c
      59

Upvotes: 1

Related Questions