Error: package directory 'xlwt' does not exist

623 views
Skip to first unread message

Brendan Cervone

unread,
Mar 31, 2016, 5:28:34 PM3/31/16
to python-excel
Trying to install xlwt-0.7.4 using cmd (extremely basic user) and this error keeps coming up when I run:

C:\python27\python   C:\users\USERNAME\desktop\xlwt-0.7.4\setup.py install

The xlwt-0.7.4 folder is in the correct path but once I hit run the following comes up

running install
running build
running build_py
error: package directory 'xlwt' does not exist


Any help to remedy this error would be greatly appreciated. Keep in mind this is the first time ive installed anything via cmd and not through a setup wizard. I have minimal skills in this arena.

Thanks!

Adrian Klaver

unread,
Mar 31, 2016, 5:48:30 PM3/31/16
to python...@googlegroups.com
On 03/31/2016 12:35 PM, Brendan Cervone wrote:
> Trying to install xlwt-0.7.4 using cmd (extremely basic user) and this
> error keeps coming up when I run:
>
> /C:\python27\python C:\users\*USERNAME*\desktop\xlwt-0.7.4\setup.py
> install/
> /
> /
> The xlwt-0.7.4 folder is in the correct path but once I hit run the
> following comes up
>
> running install
> running build
> running build_py
> error: package directory 'xlwt' does not exist

I am not familiar with building Python modules on Windows, so here it goes.

What happens if you cd into?:

C:\users\*USERNAME*\desktop\xlwt-0.7.4\

and then run:

C:\python27\python setup.py install

>
>
> Any help to remedy this error would be greatly appreciated. Keep in mind
> this is the first time ive installed anything via cmd and not through a
> setup wizard. I have minimal skills in this arena.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "python-excel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python-excel...@googlegroups.com
> <mailto:python-excel...@googlegroups.com>.
> To post to this group, send email to python...@googlegroups.com
> <mailto:python...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/python-excel.
> For more options, visit https://groups.google.com/d/optout.


--
Adrian Klaver
adrian...@aklaver.com

John Yeung

unread,
Mar 31, 2016, 6:01:25 PM3/31/16
to python-excel
On Thu, Mar 31, 2016 at 3:35 PM, Brendan Cervone <blce...@gmail.com> wrote:
> Trying to install xlwt-0.7.4 using cmd (extremely basic user) and this error
> keeps coming up when I run:
>
> C:\python27\python C:\users\USERNAME\desktop\xlwt-0.7.4\setup.py install

OK. To address your most immediate issue: You should be executing the
setup.py script from the "distribution directory", not from root or
any other arbitrary directory. In other words, you should change your
current directory to xlwt-0.7.4 and run setup.py from there. This
information is available in the Python documentation:

https://docs.python.org/2/install/

More specifically:

https://docs.python.org/2/install/#platform-variations

Now, to take a step back: Which exact Python version do you have? If
it's 2.7.9 or later, you have something called pip, which is the
preferred installer. You should try

pip install xlwt

at your command prompt. This will attempt to download the latest xlwt
from PyPI and install it for you. Is there some reason you're not
trying to install xlwt 1.0.0?

Finally, taking another step back (a pretty big one): Do you
specifically need to generate .xls files and not .xlsx? Because if the
newer .xlsx format is acceptable, then you should be installing
XlsxWriter instead of xlwt (though it certainly wouldn't hurt to
install them both).

John Y.
Reply all
Reply to author
Forward
0 new messages