Hi,
Welcome to the relax-users mailing list. I'll definitely try to help
to get relax running under Windows. I don't have a Windows system to
test things on (I deleted my Windows partition after 2 years of disuse
to recover unused space) so the process may be a bit slow. I'll
response to your specific queries below. Firstly I've created a bug
report for this issue at
https://gna.org/bugs/?func=detailitem&item_id=6841. The relax bug
tracker is located at https://gna.org/bugs/?group=relax.
There are a number of ways that these fixes can be added to your local
copy of the source code. The first is that I'll post the code changes
required to fix the Windows issues onto this thread as a patch. I
don't know though if there is a Windows equivalent of the patch
program. The second option is to get a copy of the relax source code
straight from the repository in which I've already made the changes.
This requires the installation of subversion. Then see section 3.4
'Latest sources - the relax repositories' of the relax manual for the
commands to type to retrieve the current sources for the 1.2 version.
Otherwise the patch files could be looked at (they're just diffs) and
you could make the changes to your files manually.
On 9/1/06, Daniel Perez <daniel.perez@xxxxxxxxxxxxxxxx> wrote:
Hi Ed,
I hope you have a couple of minutes to help me.
I'm trying to install relax in Windows XP. First, I installed Python 2.4
with an interpreter for Windows named ActivePython. I also installed the
extensions Numeric_23.8 and ScientificPython-2.4.9.
Then I got relax-1.2.6.src.tar.bz2, uncompressed it and copied the files
to my laptop.
After adding the extension ".py" to the excecutable "relax", I could
sort of run it, well, I only got the python compiled versions for the
executables in the base directory (color, data, errors, io and processes
".pyc") and that was all. No command window phython-looking-like or
anything similar.
I don't know exactly what to do here to get a properly executable file
here but I have been talking with Andrew Perry and it seems like an
executable batch file 'relax.bat' might be the simplest option. It
may need to open a python prompt within a window though, then again
the Windows version of python might do that automatically.
I tried to run "relax.py" from the Python IDE (using the "friendly"
ActivePython). The result was the same but I got some more information
from Python. The problem so far is that processes.py is trying to import
some linux commands (namely: kill, popopen3, and system)
Here is the output from python:
exec codeObject in __main__.__dict__
File "D:\Program Files\NMR\relax-1.2.6\relax.py", line 71, in ?
from generic_fns.main import Generic
File "D:\Program Files\NMR\relax-1.2.6\generic_fns\main.py", line 31,
in ?
from minimise import Minimise
File "D:\Program Files\NMR\relax-1.2.6\generic_fns\minimise.py", line
27, in ?
from processes import RelaxPopen3
File "D:\Program Files\NMR\relax-1.2.6\processes.py", line 23, in ?
from os import kill, popen3, system
ImportError: cannot import name kill
Yep, that 'kill' module definitely won't work under Windows. I think
I'll kill it. You could just delete the text 'kill, ' from the 'from
os import kill, popen3, system' statement in "D:\Program
Files\NMR\relax-1.2.6\processes.py" and that problem should be solved.
It's used when you run things threaded but as that code is broken you
can't even run threading code. So the change should have zero effect.
I'll work on a proper solution for the program though.
The 'os' module is supposed to be platform independent but there are a
few things which are UNIX only. 'kill' is one such object. There are
other that are likely to cause new ImportError messages and my guess
is the next error will be 'devnull'. After deleting the 'kill, '
text, do you experience new ImportErrors? Unfortunately I can't test
for that.
I greped the scripts looking for more importing features and I got:
processes.py: from os import kill, popen3, system
relax: from os import F_OK, access, getpid,
putenv
io.py: from os import devnull
io.py: from os import F_OK, access, makedirs,
remove, stat
sconstruct: from os import F_OK, access, chdir,
getcwd, lstat, path, remove, rmdir, sep, symlink, system, walk
generic_fns/dasha.py: from os import F_OK, access, chdir,
getcwd, system
generic_fns/grace.py: from os import system
generic_fns/molmol.py: from os import popen
generic_fns/palmer.py: from os import F_OK, P_WAIT, access,
chdir, chmod, getcwd, listdir, remove, spawnlp, system
generic_fns/pdb.py: from os import F_OK, access
generic_fns/selection.py: from os import F_OK, access
prompt/interpreter.py: from os import F_OK, access
sample_scripts/full_analysis.py: from os import getcwd, listdir
For me it is kind of weird the phython did not complain about the
importing from os in the file relax (the second grep entry).
The only problematic imports that I can see are 'kill' and 'devnull'.
The rest should all work under Windows. 'symlink' may be an issue as
well but that is located in the 'sconstruct' script which isn't part
of the program.
I hope this helps,
Edward
P.S. Don't forget to hit 'reply to all' when responding so that the
relax-users mailing list is on the CC line.