XLWT , XLRD , and XLUTILS

2,748 views
Skip to first unread message

Doubster

unread,
May 24, 2012, 9:45:44 PM5/24/12
to python-excel
Hello,

I am currently trying to download the 3 modules so I can work on Excel
using python. I was excited until I had to install them. I am running
windows right now. And I am having problem installing the different
modules. I red different posts with and the links attached to the
answer etc but nothing seems to be working.

I red about doing "setup.py install" but it doesn't work on command
prompt.
I red about

gunzip -c foo-1.0.tar.gz | tar xf - # unpacks into directory
foo-1.0
cd foo-1.0
python setup.py install

but I'm not sure where the " cd C:\\User\Desktop.........." is
supposed. what the location is supposed to say in the command prompt.

I am positive that there is something that I'm not getting.
I am very lost.

Could somebody please explain the installation process to me
thoroughly.
It would be much appreciated.

Chris Withers

unread,
May 25, 2012, 10:31:17 AM5/25/12
to python...@googlegroups.com, Doubster
On 25/05/2012 02:45, Doubster wrote:
>
> Could somebody please explain the installation process to me
> thoroughly.
> It would be much appreciated.

I would strongly suggest installing pip:

http://www.pip-installer.org/en/latest/installing.html

Then you just need to:

pip install xutils

...and you will have all 3 packages.


Make sure you are using Python 2, NOT Python 3.

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

Jon Clements

unread,
May 25, 2012, 5:54:45 PM5/25/12
to python...@googlegroups.com
On 25/05/12 15:31, Chris Withers wrote:
> On 25/05/2012 02:45, Doubster wrote:
>>
>> Could somebody please explain the installation process to me
>> thoroughly.
>> It would be much appreciated.
>
> I would strongly suggest installing pip:
>
> http://www.pip-installer.org/en/latest/installing.html
>
> Then you just need to:
>
> pip install xutils
>
> ...and you will have all 3 packages.
>
>
> Make sure you are using Python 2, NOT Python 3.
>
> cheers,
>
> Chris

I like pip, but have found it more useful in a virtualenv. For most
things under a linux system that should be global and recognised,
easy_install (although outdated I guess) just seems to work better with
the distro's setup.

However - I totally agree that installing xlutils is a very good way of
getting all the xl* packages at once!

Jon.



Doubea Pierre

unread,
May 26, 2012, 12:52:57 AM5/26/12
to python...@googlegroups.com
I'm sorry. But I am still not getting this. I went over the instructions but don't understand what I need to do. 
I don't understand what I'm supposed to be doing with this :
$ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
$ python virtualenv.py my_new_env
$ . my_new_env/bin/activate
(my_new_env)$ pip install ...
So since I couldn't understand the preceding message I went to http://www.pip-installer.org/en/latest/installing.html  . I made sure I downloaded the  ez_setup.py   . Which ran smoothly. THen Everything went bersek. I don't understand what It is asking and neither do I understand this :

And what does it mean to have something run as root.

Thank you for your help, 
Much appeciated. 



Jon.



--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.


Walter Prins

unread,
May 26, 2012, 4:25:17 AM5/26/12
to python...@googlegroups.com
Hi

On 26 May 2012 05:52, Doubea Pierre <dou...@gmail.com> wrote:
> I'm sorry. But I am still not getting this. I went over the instructions but
> don't understand what I need to do.
> I don't understand what I'm supposed to be doing with this :
>
> $ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
> $ python virtualenv.py my_new_env
> $ . my_new_env/bin/activate
> (my_new_env)$ pip install ...

This is Linux based instructions, but you're using Windows. You can't
use Linux based instructions for Windows.

>
> So since I couldn't understand the preceding message I went
> to http://www.pip-installer.org/en/latest/installing.html  . I made sure I
> downloaded the  ez_setup.py   . Which ran smoothly. THen Everything went
> bersek. I don't understand what It is asking and neither do I understand

berserk doesn't tell us anything about what really happened. You need
to copy (not retype) the exact commands you used as well as the exact
error messages you received.

> this :
>
> $ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
>
> And what does it mean to have something run as root.

It's a Linux term that means to run something with system wide
adminisrative privileges.

The use of virtualenv is possible on Windows but far more common on
Linux. I'd actually suggest you just forget about virtualenv for now
and try to install the xlutils either using pip or manually as you
originally were trying to do.

Open a command prompt (e.g., click start, click Run, type 'cmd' and
press enter, which opens a black window commonly referred to as a
command prompt). Then type:

pip install xutils

and press enter. This will execute the above comment and should
install xutils into your Python environment. (If you're running
Windows 7/Vista you may have to run the command prompt as
administrator, post back if you do and/or the above doesn't work, and
please copy as best you can the exact message you get. You can
copy/paste directly from the command prompt menu by using the icon on
the left top of the window, click it and you can use the menus to
enable marking an area of the prompt window, and later to copy it into
the clipboard, after which you can paste it into an email etc.)

Walter

John Machin

unread,
May 26, 2012, 4:29:36 AM5/26/12
to python...@googlegroups.com


On Friday, May 25, 2012 11:45:44 AM UTC+10, Doubster wrote:
Hello,

I am currently trying to download the 3 modules so I can work on Excel
using python. I was excited until I had to install them. I am running
windows right now. And I am having problem installing the different
modules. I red different posts with and the links attached to the
answer etc but nothing seems to be working.

I red about doing "setup.py install" but it doesn't work on command
prompt.


General advice when asking questions:

(1) "It doesn't work"  is **not**  useful information. Please state exactly what you did and what the result was ...  copy/paste straight from your console is always a good idea.

(2) State clearly, on a separate line (so that speed readers have less excuse for not noticing it) what version of what operating system you are using.


Doubea Pierre

unread,
May 26, 2012, 10:57:11 AM5/26/12
to python...@googlegroups.com
" try to install the xlutils either using pip or manually as you
originally were trying to do. "

I went on  http://pypi.python.org/pypi/xlutils#downloads  and downloaded the  xlutils-1.5.2.tar.gz (md5)   package. 

" Open a command prompt (e.g., click start, click Run, type 'cmd' and
press enter, which opens a black window commonly referred to as a
command prompt).  Then type:

pip install xutils

and press enter.  This will execute the above comment and should
install xutils into your Python environment. "

I opened a command prompt, typed " pip install xutils" ,pressed enter and got the following message:



Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Doubster>pip install xutils
'pip' is not recognized as an internal or external command,
operable program or batch file.




I'm guessing I should go to the folder where xutils is on command prompt and then try "pip install xutils". 
But I'm not sure where I should save or extract the xutils zipped package. 

Thank you




--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/python-excel/-/4-kbSE5Es0kJ.

To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.

Walter Prins

unread,
May 26, 2012, 4:28:17 PM5/26/12
to python...@googlegroups.com
Hi,

Thank you for posting your command prompt session, it helps to
establish what you've done etc.

On 26 May 2012 15:57, Doubea Pierre <dou...@gmail.com> wrote:

> I opened a command prompt, typed " pip install xutils" ,pressed enter and
> got the following message:
>
>
>
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
>
> C:\Users\Doubster>pip install xutils
> 'pip' is not recognized as an internal or external command,
> operable program or batch file.

This implies you've not got pip installed, or perhaps it's installed
but cannot be found on the search path.

> I'm guessing I should go to the folder where xutils is on command prompt and
> then try "pip install xutils".

Not quite. If you use pip (or easy_install), you don't have to
manually download anything. You give a single command and that's it.
The job gets done. The whole point of using pip is that it takes care
of all the steps needed to install a Python package, including
locating, downloading, extracting etc. Anyway, given the error above
and that I'm disinclined to try and troubleshoot/solve possible pip
installation (or lack of installation) issues I'm going to suggest we
forget about pip for the moment.

By contrast, having manually downloaded the Python xlutils package, to
then manually install the package you should "go to the folder where
xlutils" were extracted to and then run the command:

python setup.py install

Note: It doesn't matter where you extract the downloaded file to since
the needed modules are copied to the correct locations in your Python
installation by the setup script automatically. So, just extract the
downloaded package somewhere, and find the folder. There should be a
file called "setup.py" in it, as well as some other files and folders.
Once you've found the folder, open a command prompt and type:

cd "path\to\the\extracted\folder"

where "path\to\the\extracted\folder" is the full path to the folder
where the files are extracted. I suggest you use quotes like I've
shown to ensure any spaces in the path does not cause complications.
(You may be able to copy the path from a folder window if you've
located it in that way.) Once you're in the folder, which should be
obvious since the prompt in the command window should indicate this as
being the current directory, you can use the

dir

command to check that you can see the setup.py file. Then you can type:

python setup.py install

If you get a "command not found" type message, it means Python is not
on your search path either. The proper fix for that is to add Python
to your search path, but for now the easiest way to get around that,
should it be an issue is to explicitly type the entire path e.g.

c:\python27\python setup.py install

(assuming you're using Python 2.7 here, adjust as required.) That
should get you going, post back if not.

Walter

Doubea Pierre

unread,
May 27, 2012, 2:55:54 AM5/27/12
to python...@googlegroups.com
Yes . I went to the folder in which i downloaded the xlutils. 
At first it didn't work because of python not being in the search path. Then the command : 

" c:\python27\python setup.py install  "

worked perfectly. 

Thank you very much. 

Summary: Download the xlutils, or xlwt , xlrd package. They will be zipped. Extract them to a specified folder. Then open command prompt. cd ______ until you reach the specified folder. by typing in dir you can see if the setup.py folder is where you are right now. When you are there (to the specified folder) try  

python setup.py install  

and if that doesn't work and says python is not on the search path. type this instead :

c:\python27\python setup.py install 

Thank you for your help. 

--
You received this message because you are subscribed to the Google Groups "python-excel" group.

Benny

unread,
Jul 14, 2014, 4:27:54 PM7/14/14
to python...@googlegroups.com
this post is very usefull!! thanks!!! 

this work for my for the version 3.4 to install xlwt-future 0.8.0

C:\Python34\Python setup.py install

thanks a lot! 
Reply all
Reply to author
Forward
0 new messages