我正在尝试使用py2app创建一个独立的test.app。运行时
python setup.py py2app
我收到以下消息:
Modules not found (unconditional imports):
* __builtin__.open (repr)
* __main__.__requires__ (pdb)
* _imp (pkg_resources)
* _weakref.CallableProxyType (_weakrefset)
* _weakref.ProxyType (_weakrefset)
* _weakref.ReferenceType (_weakrefset)
* _weakref.getweakrefcount (_weakrefset)
* _weakref.getweakrefs (_weakrefset)
* _weakref.proxy (_weakrefset)
* _winreg.CloseKey (urllib)
* _winreg.HKEY_LOCAL_MACHINE (urllib)
* _winreg.OpenKeyEx (urllib)
* _winreg.QueryValueEx (urllib)
* errno.EINVAL (os)
* errno.ENOENT (os)
* importlib.machinery (pkg_resources)
* java.System (java.lang)
* nt._getfullpathname (os)
* nt._isdir (os)
* org (org.python.core, pickle)
* org.PyStringMap (org.python)
* org.python (copy, pickle)
* org.python.core (copy)
* org.python.core.PyStringMap (pickle)
* pkg_resources.extern.six.moves (pkg_resources)
* pwd.getpwnam (distutils.util)
* sys.getwindowsversion (os)
* sys.py3kwarning (os)
* thread._local (collections)
* thread.allocate_lock (collections)
* thread.stack_size (collections)
Modules not found (conditional imports):
* _md5 (hashlib)
* _sha (hashlib)
* _sha256 (hashlib)
* _sha512 (hashlib)
* java (platform)
* java.lang (platform)
* riscospath (os)
Done!
该应用程序已构建但是当我运行它时没有任何反应(如果我使用python test.py
运行它会有效)
这是来自Anaconda发行版的py2app。有什么想法吗?
答案 0 :(得分:0)
您需要运行 python setup.py py2app -A
。使用 -A 标志,应用程序将可以运行,并且警告会更少。