7

i have some Python Code working properly its some kinda simple thing using opencv. for example

import cv2
x = cv2.imread('Dog6.jpg')
cv2.imwrite('new2.jpg')

setup.py is

from distutils.core import setup
import py2exe
import cv2
setup(console=['name.py'])

but i am unable to create exe of this code with py2exe. is there another method to create exe of such program ?

Error is ImportError:numpy.core.multiarray failed to import

2
  • 1
    Can you show the error message. What does "but i am unable to create exe of this code with py2exe." mean in detail? Commented May 31, 2013 at 19:54
  • 1
    Error is ImportError: numpy.core.multiarray failed to import.
    – Ayub Khan
    Commented Jun 1, 2013 at 7:54

1 Answer 1

5

Put the line:

 import numpy

Into your script, i.e the first file and try again.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.