Installing xlwt module on python 2.7 [windows - 64 bit]
First Download and Extract xlwt folder into python/any Directory
If You made chdir to Xlwt folder,Then python will look only into that folder, so to view the xlwt directory from python homedirectory just add these two lines to your program at beginning.
import sys
sys.path.insert(0,new_path) where new_path is the path of xlwt folder
Now you can use import xlwt which will work fine.
import sys
sys.path.insert(0,'C:/Python27/xlwt-0.7.5')
Napalkov Andrey
Updated on June 04, 2022Comments
-
Napalkov Andrey almost 2 years
I have win 7 64-bit, and python 2.6, 2.7, 3.3 installed. When I download and extract xlwt 0.7.4 (https://pypi.python.org/pypi/xlwt), the readme asks for: .zip file into a suitable directory, chdir to that directory, then do "python setup.py install".
Is chdir necessary? How do you do this? When I run setup.py, the black command prompt appears, and nothing happens. No matter what, I still get ImportError: No module named 'xlwt' on import attempt.
Can anyone write a quick nooby step by step guide to install this useful module (Windows 7 - 8 bit)? Thanks in advance for the help.
-
user65165 almost 9 yearsi seem to only be able to download xlwt as a .tar.gz not a zip file
-
Lakshmi Narayanan over 8 yearsIt is still giving me the error. I did not extract it to a python folder, but outside in another drive. I hope that doesn't affect the functionality of insert.
-
Nagendra Babu about 8 years@LakshmiNarayanan : There won't be any effect on insert functionality though you keep your package folder at other location.... The insert function will be searching for the location we provided and will add that to python sys path. The Otherway around is, you can try using append function instead of insert which accepts only one argument that is path of the Package folder.