kits19 icon indicating copy to clipboard operation
kits19 copied to clipboard

ModuleNotFoundError: No module named 'scipy'

Open abergsneider opened this issue 4 years ago • 2 comments

TL;DR: Should scipy be included under requirements.txt?

One day attempting to run the basic loading data command:

from starter_code.visualize import visualize

visualize("case_00123", '/Volumes/Extreme_SSD/kits19/dumping')

The terminal output displayed ModuleNotFoundError: No module named 'scipy'

Not sure why.. I have run this code previously and it worked.. so something might have happened with my packages. This got me thinking. Should scipy be included under requirements.txt?

abergsneider avatar Dec 11 '20 17:12 abergsneider

The starter code has many problems :)

Among them is the fact that scipy has deprecated a lot (maybe all?) of the misc functions that I was using for visualization. I could try to find an old version of scipy and its dependencies with which the script will still work, but better yet I could remove scipy as a dependency entirely and fix some of the other problems the script has, like its intense memory usage for large cases. Since the 2021 Challenge is right around the corner and I have starter code in progress for that one, I'll plan to do the latter.

In the meantime, you should just be able to comment out the import scipy.misc line in visualize.py and visualizing in the axial plane should still work just fine.

Thanks for bringing this up, I'll plan to keep this issue open until I push a longer term solution. Please let me know if you run into any trouble with the workaround in the meantime.

neheller avatar Dec 11 '20 18:12 neheller

Thanks for the quick response @neheller ! I ended up running pip3 install scipy and it did it for me. But I'll try commenting it next time. And so excited for KiTS 2021! Take care.

abergsneider avatar Dec 11 '20 19:12 abergsneider