Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I created a python file and used cs_freeze to convert it to an exe file. When I ran the exe, I am getting the following error.

File "C:\Python36\lib\site-packages\scipy\spatial\__init__.py", line 94, in <module> from .ckdtree import *
 ModuleNotFoundError: No module named 'scipy.spatial.ckdtree' 

I checked init.py in spatial. It is importing from ckdtree.py. But there is no file named ckdtree in spatial folder. I have a file named "ckdtree.cp36-win32.pyd" in the same folder.

I am running on a windows 7, with 32 bit python.

I downloaded the whl file from pypi and installed scipy.

Why would I be getting this error. Why would be my installation missing ckdtree.py.

cKDTree is a faster C version of KDTree, written in Cython. There is no file cKDTree.py, the ckdtree.cp36-win32.pyd is the binary, compiled module. You should be able to work with it as with a .py file.

How does your import look like?

import scipy.spatial.ckdtree ?

from scipy.spatial import ckdtree ?

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.