Why am I getting a no module named cx_Freeze error after installing cx_freeze?
Finally found the solution to this problem! Been trying for two days and a programmer friend helped me (I'm not a programmer myself).
So, when you type in "python setup.py build" to cmd, what it tries to do is look for python.exe in the folder you are in, and if it doesn't find it there then looks to system paths (which you can access with the command "echo %PATH%").
So it looks there, it finds python and runs it - but python doesn't have cx_Freeze. Why? Because the python in the system path is an older version you have!! For me it was 2.6.5, despite me using 3.3. And this older version naturally didn't have cx_Freeze in it because I installed it to 3.3. This also explains why trying "import cx_Freeze" in IDLE works without problems.
To see which version of python cmd is calling, type only "python" in cmd and it will show you.
Ok, so the quick solution is to simply add the full absolute path leading to desired python.exe. For python 3.3 it's:
c:\python33\python setup.py build
The long-term solution is to add python 3.3 to your system paths. I haven't done it myself, but this should be the info on how to do it http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
It's a late answer, but I hope this at least helps someone else. Enjoy your cx_Freeze
When I try to compile and .exe I get ImportError: No module named six
http://i289.photobucket.com/albums/ll233/89733/stacked_help_zpsnrvlayj4.jpg
After Gabriel asked for the screenshot I took a closer look.
pip install urllib3 --upgrade solved the issue, which I found here:
https://github.com/transifex/transifex-client/issues/103
cx_Freeze no module named google Error
No module named 'google'
To import google or anything from google there must be a __init__.py
file in the google directory.
Create that file in google directory and you can import from it.
I had same exact problem.
ImportError: No module named 'queue' while running my app freezed with cx_freeze
I had the same issues running on Ubuntu with Python 3.5. It seems that cx_freeze
has problems with libraries that import other files or something like that.
Importing Queue
together with requests
worked for me, so:
import requests
from multiprocessing import Queue
And I don't think specifying urllib
in "packages": ["urllib", "requests"]
is necessary.
Related Topics
Find Nearest Value in Numpy Array
How to Read a File in Reverse Order
Convert Timestamps With Offset to Datetime Obj Using Strptime
How to Organize My Tkinter Appllication
Getting a List of All Subdirectories in the Current Directory
How to Crop an Image in Opencv Using Python
Check If a String Contains a Number
Python List by Value Not by Reference
How to Remove List Elements in a For Loop in Python
Overriding Special Methods on an Instance
Installing Python 2.7 Without Root
Set the Hardware Clock in Python
How to Get Each Dependent Command Execution Output Using Paramiko Exec_Command
Capturing Output of Python Script Run Inside a Docker Container
What's the Advantage of Queues Over Pipes When Communicating Between Processes