python - cx_freeze no module named 'pkg_resources' -
i'm using python 3.3.5 cx-freeze 4.3.3 on windows 8.1.
i'm trying cx_freeze program uses pkg_resources.
i had in setup file under packages, when tried freeze processes stopped error import error: no module named 'pkg_resources'
.
i moved in setup file packages includes. cx_freeze process completed time when tried start application got error message.
if go ide , try import pkg_resources works fine.
>>> import pkg_resources >>> pkg_resources <module 'pkg_resources' 'c:\\python33\\lib\\site-packages\\setuptools-18.0.1-py3.3.egg\\pkg_resources\\__init__.py'>
there's similar question asked here, , solution re-install setuptools. downloaded setuptools 18.0.1 , installed via cmd, did not solve problem , i'm still getting same errors cx_freeze.
any getting work appreciated.
edit: solution (hack) has been write dependency out of yagmail. yagmail's original _innit__.py...
from pkg_resources import get_distribution __project__ = 'yagmail' __version__ = get_distribution(__project__).version
i first put print statement in there version, , hard coded it.
__project__ = 'yagmail' __version__ = '0.4.84'
though has solved problem isn't answer, leave open should have solution keeps pkg_resources.
Comments
Post a Comment