Could not start Python script using Conda

I tried to install menpo, as in this tutorial . After that, I installed menpofit, menpo3d and menpodetect:

conda install -c menpo menpofit

conda install -c menpo menpo3d

conda install -c menpo menpodetect

Then I ran this python script from CMD (python testPy.py):

import menpo.io as mio
from menpo.visualize import visualize_images

images = list(mio.import_images('A:/img/*.png'))
visualize_images(images)

And I got this conclusion: enter image description here What am I doing wrong and how can I fix it?

+4
source share
1 answer

It seems to be visualize_imagessupposed to be used from ipython-notebook. Calling it in a regular pythonscript does not seem to be intended for authors.

. Visualizing Objects :

%matplotlib inline
import menpo.io as mio
from menpo.visualize import visualize_images

# import_images is a generator, so we must exhaust the generator before
# we can visualize the list. This is because the widget allows you to
# jump arbitrarily around the list, which cannot be done with generators.
images = list(mio.import_images('./path/to/images/*.jpg'))
visualize_images(images)
+4

All Articles