On 06/16/12 09:36, Pete Brunet wrote:
When using hg commands I always get:
*** failed to import extension defpath from
C:\Users\Pete\hg-extensions\defpath\defpath.py: No module named HTMLParser
I am using cygwin 1.7.0 (instead of the latest due to needing to run on
Windows 7).
Did this hg and python come with your Cygwin install?
Cygwin-aware programs expect Cygwin style paths, with /cygdrive/... and
':' separating the elements of a search path.
I tried adding the following to my environment variables but that didn't
help. which/where indicates python is at this location.
PYTHONHOME=C:\Program Files\Python27
PYTHONPATH=C:\Program Files\Python27;C:\Program Files\Python27\Lib
This is what a traditional Windows program would expect, but Cygwin
programs won't understand the ':' and '\' characters
If I type:
python /cygdrive/c/Users/Pete/hg-extensions/defpath/defpath.py
I get
python.exe: can't open file
'/cygdrive/c/Users/Pete/hg-extensions/defpath/defpath.py' [Errno 2] No
such file or directory
What happens when you run the Windows equivalent command line:
python c:/Users/Pete/hg-extensions/defpath/defpath.py
If I type
ll /cygdrive/c/Users/Pete/hg-extensions/defpath/defpath.py
that file is there (and the rights are 700).
If I use python -v I see lots of "can't create" messages.
During what? An 'hg clone' operation, or something else?. Can't create
output files, or .pyc files, or what files where?
cygwin "as administrator" I don't see the "can't create" messages when
using python -v but I still get the Errno 2 failure. Also running hg
within an "as adminstrator" cygwin doesn't help.
Does anyone have any ideas?
Does your windows login have 'Administrator' privileges? If not, you
probably want to grant yourself 'Administrator' before proceeding.
Hope this helps-
Tim