from xlutils.copy import copy ImportError: No module named copy

2.9k Views Asked by At

I want to modify the existing worksheet. When I input

from xlutils.copy import copy

then I got

ImportError: No module named copy

I have try reinstall xlutils from different ways, it still doesn't work. Lib\site-packages\xlutils\copy.py is also existing. How can I do about this? thanx :)

1

There are 1 best solutions below

0
On BEST ANSWER

I've tried both

from xlutils.copy import copy
from xlutils import copy

both works. It seems your python lib is not in your lib path. try the following code:

import sys
print (sys.path)

and check if your lib path is there. if not add the lib path using:

sys.path.append('/your-lib-path')

in python code, or add the lib path to your environment variable PYTHONPATH