-
-
Notifications
You must be signed in to change notification settings - Fork 217
-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
cx_Freeze - ImportError: No module named 'scipy.spatial.ckdtree' #233
Comments
Is there a way to temporarily sidestep this error, while a more permanent solution is in the works? E.g. can I manually copy files into a location? |
Nevermind, simply copying |
I compare the scipy included files under exe build path with my python path, found that there is a file name conflict between |
This is also an issue for me, and it's preventing me from deploying an msi. Is there a way to target the dist folder instead to create an msi? |
Think I found the problem. cx_Freeze looks like it's duplicating this module, the first time with the wrong name; and when it tries to write the second time I suppose the first .pyd won't get overwritten. Yay for Windows not being case-sensitive!!!! From the modules list from cx_Freeze.finder:
There is no cKDTree module. It's only ckdtree. I'm not even sure how it got the capitalized .pyd file cause it doesn't even exist. I did check the module itself just to be thorough and there isn't even a class named cKDTree, only KDTree. The module docstrings do suggest there might be some cKDTree cxx file somewhere but I think those are kept and maintained by the scipy team only as I can't find anything like that. I wrote a really hanky 5 line workaround to get this thing to work but I'm really not pleased with this solution. My guess is that the root cause is somewhere in the finder.py module with all the hanky _Import helper subfunctions. Not sure why the choice was made to recurse that way but w/e. |
this might be a conflict between the cKDTree class and the ckdtree module and how it gets imported in other packages. I see it's used in astropy and sklearn packages as well as from within scipy in several places. if you don't need ckdtree, then in lib/site-packages/scipy/spatial/init.py, comment out line 94: |
I found a simple workaround on windows: add 'scipy.spatial.cKDTree' to then the |
Is this still relevant for the latest code on the v5.x and master branches? Its possible another bug fix may have corrected this already. |
Last time i updated it still was an issue, but that was 6 months ago. Next
time I build my app I'll let you know.
…On Dec 10, 2017 1:00 AM, "Anthony Tuininga" ***@***.***> wrote:
Is this still relevant for the latest code on the v5.x and master
branches? Its possible another bug fix may have corrected this already.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH0ST4Ov2NH8mEcdDwJdeQfyMRMSpD40ks5s-x8WgaJpZM4M3TJh>
.
|
I just encountered this problem using the 5.1.1 release. I followed @7kbird 's advice about excluding 'scipy.spatial.cKDTree' and that work in my situation. |
I can confirm it too. Workaround from @7kbird works, please note if you're not paying attention like me that the typo is important. |
Workaround from @7kbird didnt work in my case. I had to rename cKDTree.cp36-win_amd64.pyd to ckdtree.pyd in the relevant build directory (lib\scipy\spatial). |
cx_Freeze 6.1 has just been released. |
Sadly, I struggled with exactly this problem today, And then @7kbird 's post works to solve it. Using version 6.1 on windows 10 |
I just came across the same issue today using cx_Freeze 6.1 under Windows 10, and the workaround of @7kbird did the trick. I suppose we should re-open the issue ? |
I'll make a PR for the next release. |
Can you test the PR? (only if you have a C compiler)
|
Please note, this issue still exists. I find the same issue with none of the workarounds working for me. |
@marinaPauw, was your test with cx-freeze 6.1 or current master? |
I was using the latest version available via pip install --upgrade, but it seems the issue had indeed been resolved. I was stuck so long with it I uninstalled python and all the packages and re-installed only the ones I needed for this project and now it seems to work! Despite my having previously reinstalled scipy itself. So probably one of the packages was installed incorrectly or there was a version mismatch somewhere. Either way, I no longer get this error, thanks for your rapid response! |
I was getting a similar issue on scipy.ndimage:
I needed to remove the build files copied over, and then it worked. However, I am still getting an issue with running the .exe on its own. Inside the command line, it works fine. Once I try clicking on the .exe, it freezes and dies. |
Originally reported by: Anonymous
exe was build .but,not working error will come
The text was updated successfully, but these errors were encountered: