Cx_freeze no module named 'pkg_resources'

I am using Python 3.3.5 with cx-freeze 4.3.3 on Windows 8.1.

I am trying cx_freeze program that uses pkg_resources.

I initially used it in my setup file under packages, but when I tried to freeze it, the processes stopped with an error Import Error: No module named 'pkg_resources'.

enter image description here

Then I moved it to the installation file from the included packages. The cx_freeze process ended this time, but when I tried to start the application, I got another error message.

enter image description here

If I go into my IDE and try to import pkg_resources, it works fine.

>>> import pkg_resources
>>> pkg_resources
<module 'pkg_resources' from 'C:\\Python33\\lib\\site-packages\\setuptools-18.0.1-py3.3.egg\\pkg_resources\\__init__.py'>

, setuptools. setuptools 18.0.1 cmd, , cx_freeze.

, , .

: () , yagmail. Yagmail original _innit __. Py...

from pkg_resources import get_distribution
__project__ = 'yagmail'
__version__ = get_distribution(__project__).version

, , .

__project__ = 'yagmail'
__version__ = '0.4.84'

, , , - , pkg_resources.

+4

All Articles