My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 234: Installation using install.py fails if Python is installed into a path with spaces
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  pekka.klarck
Closed:  Feb 2009
Type-Defect
Priority-Medium
Target-2.1


Sign in to add a comment
 
Reported by heiko.se...@nsn.com, Feb 17, 2009
I had installed python to 'D:\Program Files\Python25', a path which
contains a blank.

When I tried to setup robot I got this error message:

D:\robotframework-2.0.4>python install.py install
Installing Robot Framework...
Der Befehl "D:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Installation failed.

(German for  "D:\Program" can't be found [...].)

Obviously the path to python.exe needs to be quoted in install.py. Here is
the diff for a proposed change:

D:\robotframework-2.0.4>diff install.py install.py.org
38c38
<     rc = os.system('"%s" %s install' % (sys.executable, setup))
---
>     rc = os.system('%s %s install' % (sys.executable, setup))


I'm running (pybot --version):

Robot Framework 2.0.4 (Python 2.5.4 on win32)
Comment 1 by pekka.klarck, Feb 23, 2009
Fixed in r1336 exactly like proposed above. Would've wanted to use subprocess.call
which handles escaping automatically, but since we still want to keep Python 2.3
support couldn't do that.

Heiko, could you test this on your environment if you still have Python installed
into a directory with spaces? I wouldn't want to install extra Pythons on my normal
machines and don't have any virtual environment available. I already tested that
install.py works on Windows and Linux when there are no spaces in sys.executable. You
can simply copy the latest version over earlier from
http://robotframework.googlecode.com/svn/trunk/install.py

I updated the summary because the same problem appears also if source is checked out
from version control. 
Summary: Installation using install.py fails if Python is installed into a path with spaces
Status: Started
Labels: Target-2.1
Comment 2 by pekka.klarck, Feb 23, 2009
Notice that installation is still likely to fail if the source is unzipped or checked
out into a directory with spaces in path. Handling also that isn't exactly trivial as
 issue 166  shows. In there the final solution was to call Python script directly (i.e.
without having sys.executable) but that doesn't work here since it will use system's
default Python and we want to use the same sys.executable that was used to start
install.py to run also setup.py.
Comment 3 by heiko.se...@nsn.com, Feb 24, 2009
Yes, the installation works with the correction. The installed robotframework works, too.

I didn't try to install robot into a directory with spaces (yet). Maybe I can try
later and raise an issue if it fails.

Comment 4 by pekka.klarck, Feb 24, 2009
Thanks for testing Heiko.

The other issue I mentioned is not related to installing RF to directory with spaces
(RF is installed under Python so that ought to work already now). It can be that if
you extract the tar.gz package into a directory with spaces (or checkout code into
such directory from SVN) running install.py there fails.
Status: Done
Comment 5 by pekka.klarck, Mar 20, 2009
(No comment was entered for this change.)
Owner: pekka.klarck
Sign in to add a comment

Hosted by Google Code