Open main menu

Changes

m
__TOC__ == Download preparation ==
This guide should follow [http://www.nmr-relax.com/windows_devel.html Homepage for MS Windows development platform]
# (.exe): wxPython: http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
# (.exe): scons: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scons
# (.zip): [{{minfxhomepage}} minfx]: httphttps://downloadsourceforge.gna.orgnet/projects/minfx/files/# (.zip): [{{bmrblib homepage}} bmrblib]: httphttps://downloadsourceforge.gna.orgnet/projects/bmrblib/files/
'''take amd64 the win32 bit versions if you have a computer with 64 bit.'''
== Install python and necessary packages ==
I recommend to install a python distribution which is packed with several packages already.
=== Winpython ===
You could consider winpython, which includes Ipython, numpy, scipy. matplotlib etc.:<br>
[https://code.google.com/p/winpython Homepage]
Make a folder: '''C:\WinPython27'''.<br>
Run the downloaded winpython exe file, and extract to: '''C:\WinPython27'''.<br>
Open '''WinPython Control Panel''' in ex. '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1x'''<br>
Drag the 4 above mentioned packakes, into the window, and install the packages.<br>
For a command window, use the '''WinPython Command Prompt''' found in '''C:\WinPython27\WinPython-64bit32bit-2.7.4.1x''', which fixes path issues for finding python.
= Install Visual Studio Express 2012 for Windows Desktop === Trick to set variables in cmd ====[httpMake a folder '''own''' in '''C://msdn\WinPython27\WinPython-32bit-2.7.x\scripts''' and <br>copy '''C:\WinPython27\WinPython-32bit-2.microsoft7.com/enx\scripts\env.bat''' to '''C:\WinPython27\WinPython-us/library/vstudio/hs24szh932bit-2.aspx See versions of VS 2012 here]7.x\scripts\own\pyt32.bat'''<br>Take 32 bit compiling, since a horrible imprecision bug has been reported for 64 bit buildingand copy '''C:\WinPython27\WinPython-32bit-2.7.x\scripts\cmd. [httpsbat''' to '''C://gna\WinPython27\WinPython-32bit-2.7.org/bugs/?20821 See bug #20821]x\scripts\own\cmdpyt32.bat'''<br>
For 32 bit compiling, you will only need, Modify '''Visual Studio Express for Windows Desktoppyt32.bat'''.from<brsource lang="python">From http://wwwset WINPYDIR=%~dp0.microsoft.com/visualstudio/eng/downloads, download and install: [http://go\python-2.microsoft7.com5</?linkid=9816758 Visual Studio 2012 Express for Windows Desktop].<brsource>Skip all extra packages install. After install, just exit any program, which opened after install. == Bugfix scons for 32bit building ==Due to a bug, versions of scons include '''<=2.3.\''' should alter a line in:<brsource lang="python">'''C:set WINPYDIR=%~dp0..\WinPython27\WinPython-64bit-2.7.5.1\python-2.7.5.amd64\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py'''</source>
Line Modify '''364cmdpyt32.bat''':from
<source lang="python">
if not req_target_platform and target_platform in ('amd64','x86_64'): try_target_archscall %~dp0env.append('x86')bat
</source>
Should be:to
<source lang="python">
#if not req_target_platform and target_platform in ('amd64','x86_64'): # try_target_archscall %~dp0pyt32.append('x86') if target_platform in ('amd64','x86_64'): try_target_archs.append('x86') print "requested", req_target_platform print "target", target_platform print "try", try_target_archsbat
</source>
==== Trick to add .bat files to PATH ====If not fixing you have permission to change the bugEnvironment Variables in windows, you will getcan add the '''pyt32.bat''' and '''cmdpyt32.bat''' to your path.<br>Right click Computer -> properties -> Advanced system settings -> Environment Variables -> User variables -> Edit: PATH <br>Add to end of the Variable value: ;C:\WinPython27\WinPython-32bit-2.7.x\scripts\ownIn any folder, hold "Shift" and right click, "Open command window here". Write:
<source lang="powershell">
C:\WinPython27\relax_disp>sconspyt32scons: Reading SConscript files ...pythonscons: done reading SConscript files.scons: Building targets ...</source>
###########################== Install Visual Studio Express 2012 for Windows Desktop ==# Compiling the C modules ############################Building the relaxation curve fitting module 'target_functions\\relax_fit[http://msdn.microsoft.com/en-us/library/vstudio/hs24szh9.aspx See versions of VS 2012 here].pyd'<br>
cl For 32 bit compiling, you will only need, '''Visual Studio Express for Windows Desktop'''.<br>From http:/Fotarget_functions\c_chi2/www.microsoft.obj com/c target_functions\c_chi2.c visualstudio/nologo eng/I"Cdownloads, download and install: [http:\WinPython27\WinPython-64bit-2//go.7microsoft.5com/?linkid=9816758 Visual Studio 2012 Express for Windows Desktop].1\scripts\..\python-2.7.5<br>Skip all extra packages install.amd64\include"'cl' is not recognized as an internal or external commandAfter install,operable just exit any program or batch file.scons: *** [target_functions\c_chi2.obj] Error 1scons: building terminated because of errors, which opened after install.</source>
== Install Subversion checkout of relax =={{historical svn}}
Install a subversion client. For example: http://tortoisesvn.net/
Right click in winpython folder: '''C:\WinPython27''', and select '''SVN Checkout'''. Write the path:
svn://svn.gna.org/svn/relax/trunk svn://svn.gna.org/svn/relax/branches/relax_disprelax_trunk
== Build relax ==
Open the '''WinPython Command Prompt''' <br>
Navigate to the SVN checked out relax folder.<br>
First we need to run the variable setup [http cd C://msdn.microsoft.com/en-us/library/f2ccy3wt(v=vs.110).aspx vcvars32.bat] or [http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx vcvarsall.bat x86] for Microsoft Visual Studio 11.0, before we can compile.\WinPython27\relax_trunk_32 scons
cd Or navigate to C:\WinPython27\relax_disp relax_trunk_32, hold "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.batShift" "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.batand right click, " Open command window here"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86 "CWrite:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64 echo %PROCESSOR_ARCHITECTURE% set PROCESSOR_ARCHITECTURE=x86 echo %PROCESSOR_ARCHITECTURE%pyt32
scons
(Scons will automatically find CL.exe, and setup compilation for 64 bit.)
=== Modify envpyt32.bat ===Modify '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1xxx\scripts\envown\pyt32.bat''', and add to end of file
<source lang="powershell">
set PATH=%PATH%;C:\WinPython27\relax_disprelax_trunk_32
</source>
Test installation, by clicking '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1xxx\scripts\cmdown\cmdpyt32.bat''', and write
<source lang="powershell">
relax
</source>
==== Tip - shortcut to cmdcmdpyt32.bat ====Make shortcut to '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1xxx\scripts\cmdown\cmdpyt32.bat''', and modify the shortcut. Set
'''Start in:''' %PWD%
You can now copy this shortcut around, which open a command prompt at the current folder, and set the paths correctly.
==Install other software = Tip ==== xmgrace - add env.bat to windows path for the plotting results of NMR-relax ===If you have permission to change the Environment Variables in windows, you can add the ''relax produces xmgrace "'env.bat''' to your pathagr" files for plotting.<br>Right click Computer -> properties -> Advanced system settings -> Environment Variables -> User variables -> Edit: PATH <br>Add There exist two ports for xmgrace to end of the Variable valuewindows [http: ;C:\WinPython27\WinPython-64bit-2//qtgrace.7sourceforge.5.1\scriptsIn any folder, hold "Shift" net/ QtGrace] and right click, "Open command window here"[http://sourceforge. Write:<source lang="powershell">envrelax -g<net/projects/gracegtk/source>GraceGTK].
= Install other software === xmgrace - for the plotting results of NMR-relax ==relax produces xmgrace "'.agr" files for plotting. There exist two ports for xmgrace to windows Download [http://sourceforge.net/projects/qtgrace/ QtGrace] and [http://sourceforge.net/projects/gracegtk/ GraceGTK]. <br>Download [http://sourceforge.net/projects/qtgracefiles/ QtGraceqtgrace_windows_binary], and unpack to '''C:\WinPython27\qtgrace_windows_binary'''. <br>
Then copy '''C:\WinPython27\qtgrace_windows_binary\bin\qtgrace.exe''' to '''C:\WinPython27\qtgrace_windows_binary\bin\xmgrace.exe'''
Modify '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1xxx\scripts\envown\pyt32.bat''', and add to end of file
<source lang="powershell">
set PATH=%PATH%;C:\WinPython27\qtgrace_windows_binary\bin
</source>
Test installation, by clicking '''C:\WinPython27\WinPython-64bit32bit-2.7.5.1xxx\scripts\cmdown\cmdpyt32.bat''', and write
<source lang="powershell">
xmgrace
which should start xmgrace.
=== Python editor ===
A good lightweight editor for windows could [[Pyscripter]]
= Trouble shooting =Test installation =={{caution|After an installation you should really run an [[Installation_test]].}}
= = Build manual and API documentation ==See also =[[Manual]].
== Trouble shooting ==
== See also ==
[[Category:Installation]]
Trusted, Bureaucrats
4,228

edits