New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named multiprocessing.pool #353
Comments
Turned out, i found the solution. |
Any idea for a non manual fix? Edit::
|
In my case, the |
This one work for me as well. |
Any ideas if I still getting this error??
"\lib\multiprocessing\pool.pyc" - this one is written like that "pool.pyc" But still not working
Found what I was doing wrong! |
@jpegcoma could you please share what you did that solved the issue? I am facing a similar issue with bundling sklearn with cx freeze. I tested the rest of the application - it works fine, but with sklearn it shows errors - pool.pyc, scipy.spatial.ckdtree etc.. Any help would be appreciated. |
@Malyaj, actually I did exactly what was said in upper answers, bro. Let Cx_Freeze work, it will make the 'build' folder, go to 'multiprocessing' in this folder and rename 'Pool' to 'pool' in the folder. |
This fixes the issue in the build folder, but the problem remains if building/distributing using bdist_msi. Any solution there? |
I added the following lines to the end of my cx_freeze.py to automatically rename the file after build: BUILD_PATH_POOL = (
Path.cwd() / 'build' / BUILD_NAME /
'lib' / 'multiprocessing')
Path(BUILD_PATH_POOL / 'Pool.pyc').rename(
BUILD_PATH_POOL / 'pool.pyc') (Note: the path format requires This has worked for me for a while now. |
Here is the ready corrected cx-freeze file. According to your instructions. |
Did somebody fix this? I am stuck on this problem. |
I got it figured out, actually. Go into your Python installation directory > Lib > site-packages > cx_Freeze. You want to edit hooks.py by adding the line
to the 'initialize' function, right after the other invocations of finder.ExcludeModule(). Hope that helps. Now running cx_Freeze with bdist_msi works just fine, for me at least. |
Just adding 'multiprocessing.Pool' to the excludes in the setup.py also seems to work just fine! |
Can you test the PR? (only if you have a C compiler)
|
Works for me! |
Hi,
i'm trying to use cx_freeze with sklearn package.
I use the multiprocessing.pool package and so far, tell cx_freeze to import by putting it on the package list in my setup.py. But, i've got an error when launching my .exe
Here is the log :
And here is my setup.py :
Could you please give me any advice on what's wrong ?
Thx
The text was updated successfully, but these errors were encountered: