Hello, people. A newbie here... sorry.
A hired programmer (who doesn't use Windows) is writing a Python thing for me,
On my Windows 7 PC, I installed Python v 3.4.3, and he says that I need to install
certain non-standard modules... lxml, requests and xlwt from
http://lxml.de/
http://docs.python-requests.org/en/latest/
https://pypi.python.org/pypi/xlwt
Trying to install that first one, LXML, I went to that website and downloaded
lxml-3.4.4.win32-py3.2.exe
I then started it, and it said...
"Python version 3.2 required, which was not found in the registry."
I'd rather not install an older version of Python, but... what else can I do?

For the 2nd one, REQUESTS, the Installation page says...
Installing Requests is simple with pip, just run this in your terminal:
$ pip install requests

What "terminal" am I using, and what's with the "$" symbol? I dunno'.
I tried various lines in a CMD window, but nothing worked.

The 3rd one, XLWT, says...
Do the following in your virtualenv:
pip install xlwt

Where is my "virtualenv" ?

Help, please.

Thanks.

Mark54

I installed Python v 3.4.3

pip comes pre-installed on Python 3.4.3,do not install pip.
First set up environment Variables Path,
Same as in video,but also point to script folder(pip placement),so for Python 3.4 you add ;C:\python34\;C:\python34\scripts to Path.

What "terminal" am I using, and what's with the "$" symbol? I dunno'.
I tried various lines in a CMD window, but nothing worked.

The "$" is for Linux,you use cmd.
Try again in cmd now that you have set environment Variables.
pip install requests

lxml-3.4.4.win32-py3.2.exe
I then started it, and it said...
"Python version 3.2 required, which was not found in the registry."

For lxml go to Gohlke
Download lxml‑3.4.4‑cp33‑none‑win32.whl to e.g python34/scripts folder.
Navigate in cmd to scripts folder,then do pip install lxml‑3.4.4‑cp33‑none‑win32.whl
Test that it work.

>>> from lxml import etree
>>> etree.__version__
u'3.3.0'

Edited 1 Year Ago by snippsat

lxml-3.4.4.win32-py3.2.exe
works only with Python 3.2

lxml-3.4.4-cp33-none-win32.whl
works only with Python 3.3

From
http://www.lfd.uci.edu/~gohlke/pythonlibs/
download (under Misc at the bottom of the page) ...
xlwt-1.0.0-py2.py3-none-any.whl
that works with any Python3 version
The download usually ends up in folder
C:/Users/xxxxx/Downloads/
substitude xxxxx with your user name on your computer

You than can use Windows cmd.exe or ...
Anaconda comes with the Spyder IDE
in that IDE you can use Tools and then Open command prompt to get a command window where you can enter (xxxxx is your user name) ...
pip install C:/Users/xxxxx/Downloads/xlwt-1.0.0-py2.py3-none-any.whl

Well, Thanks for the Anaconda recommendation, Vegaseat, but it doesn't include the latest versions of LXML or REQUESTS,
and it doesn't have XLWT, and I'd rather not download all of that other stuff if it's not needed.

Yes, Snippsat, the HowToGeek.com article article that I found says that PIP would already be included.
And it also said how to get the environment variable Path to be automatically done.
I had tried the "pip install requests" in Python in the CMD window, but it gave an "invalid syntax" error.
I thought that PIP was a Python thing, not a command-line thing.
Upon your suggestion, I quit Python, and did the same thing in CMD. It Worked! Thanks!
I also tried it for LXML and It did a lot of stuff, probably worked, but with some error messages at the end.
I'll assume those were just warnings.
The XLWT install Worked! THANKS Very Much.
So, does this mean that I didn't need to Download anything for those 3 modules?
Python just knows where to get the latest versions? Cool! I might Like this Python thing.
I tried the Python program that was sent, but it quit with a SyntaxError. I alerted the programmer.

Thanks Very Much for your help, people.

OK,... I suppose that I marked this thing as "solved" too early. :(
I tried to re-install the LXML module, Snippsat...
However, lxml-3.4.4-cp33-none-win32.whl "is not a supported wheel".
So, I tried lxml-3.4.4-cp34-none-win32.whl. That seems to have worked.
And the 3 test lines of Python code that you wrote returned '3.4.4'
So, everything should be OK, me thinks.
Still, the program ended with the same error, on line 94...
print "Action Date: " + str(actionDate)

                    ^

SyntaxError: invalid syntax

with that "caret" under the second " character.
So, I wrote my own Very First (one line) Python program!... (aren't you guys Proud?) :)
print "Action Date: "
and it said...
SyntaxError: Missing parentheses in call to 'print' . So, I did...
print ("Action Date: ")
and it Worked !
OK,... I know that my hired programmer does his development with Linux and/or Macos.
And apparently... those Parentheses are NOT need there, but they ARE needed in Windows?
Is that it?
What Else is different between Linux and Windows requirements?
Thanks for your time, people.

If the developer used Python2 to develop your program, you might as well install Python 2.7 or you will have lots of errors. Python2 and Python3 are not compatible in many ways.

Some conversions can be made by using file 2to3.py, but it won't catch all changes (usually in C:/Python34/Tools/Scripts/2to3.py).

Edited 1 Year Ago by vegaseat

To take care of unicode Python3 has introduced byte strings which have replaced strings in many functions internal to Python3. Running Python2 code will trip up on these.

Python 2.7 is the final version of Python2, but is upgraded and maintained by python.org for many years to come.

Edited 1 Year Ago by vegaseat

This question has already been answered. Start a new discussion instead.