Installation windows Python x86-64 Visual Studio Express Professional
Warning STOP: Due to a bug with a high imprecision in a windows 7 system, compiles with Visual Studio Express Professional, See bug #20821, this installation is not recommended! |
Contents
Download preparation
First: Download these packages, do not unpack them yet.
- (.exe): wxPython: http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
- (.exe): scons: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scons
- (.zip): minfx: http://download.gna.org/minfx/
- (.zip): bmrblib: http://download.gna.org/bmrblib/
take amd64 versions.
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.:
Homepage
Make a folder: C:\WinPython27.
Run the downloaded winpython exe file, and extract to: C:\WinPython27.
Open WinPython Control Panel in ex. C:\WinPython27\WinPython-64bit-2.7.x
Drag the 4 above mentioned packakes, into the window, and install the packages.
For a command window, use the WinPython Command Prompt found in C:\WinPython27\WinPython-64bit-2.7.x, which fixes path issues for finding python.
Trick to set variables in cmd
Make a folder own in C:\WinPython27\WinPython-64bit-2.7.x\scripts and
copy C:\WinPython27\WinPython-64bit-2.7.x\scripts\env.bat to C:\WinPython27\WinPython-64bit-2.7.x\scripts\own\pyt64.bat
and copy C:\WinPython27\WinPython-64bit-2.7.x\scripts\cmd.bat to C:\WinPython27\WinPython-64bit-2.7.x\scripts\own\cmdpyt64.bat
Modify pyt64.bat from
set WINPYDIR=%~dp0..\python-2.7.5.amd64
to include ..\
set WINPYDIR=%~dp0..\..\python-2.7.5.amd64
Modify cmdpyt64.bat from
call %~dp0env.bat
to
call %~dp0pyt64.bat
Trick to add .bat files to PATH
If you have permission to change the Environment Variables in windows, you can add the pyt64.bat and cmdpyt64.bat to your path.
Right click Computer -> properties -> Advanced system settings -> Environment Variables -> User variables -> Edit: PATH
Add to end of the Variable value:
;C:\WinPython27\WinPython-64bit-2.7.x\scripts\own
In any folder, hold "Shift" and right click, "Open command window here". Write:
pyt64
python
Install Visual Studio Professional 2012
See versions of VS 2012 here.
For 64 bit compiling, you will need, Visual Studio Professional, since it has: 64-bit x64 compiler.
From http://www.microsoft.com/visualstudio/eng/downloads, download and install: Visual Studio Professional 2012 90-day trial.
Skip all extra packages install. After install, just exit any program, which opened after install.
Install Subversion checkout of relax
Caution The information in this section is out of date but is kept for historical reasons. The relax source code is now hosted in a git rather than svn repository. |
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/branches/relax_disp relax_disp_64
Build relax
Open the WinPython Command Prompt
Navigate to the SVN checked out relax folder
cd C:\WinPython27\relax_disp_64 scons
Or navigate to C:\WinPython27\relax_disp_64, hold "Shift" and right click, "Open command window here". Write:
pyt64 scons
Modify pyt64.bat
Modify C:\WinPython27\WinPython-64bit-xxx\scripts\own\pyt64.bat, and add to end of file
set PATH=%PATH%;C:\WinPython27\relax_disp_64
Test installation, by clicking C:\WinPython27\WinPython-64bit-xxx\scripts\own\cmdpyt64.bat, and write
relax
relax -g
Tip - shortcut to cmdpyt64.bat
Make shortcut to C:\WinPython27\WinPython-64bit-xxx\scripts\own\cmdpyt64.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
xmgrace - for the plotting results of NMR-relax
relax produces xmgrace "'.agr" files for plotting. There exist two ports for xmgrace to windows QtGrace and GraceGTK.
Download QtGrace, and unpack to C:\WinPython27\qtgrace_windows_binary.
Then copy C:\WinPython27\qtgrace_windows_binary\bin\qtgrace.exe to C:\WinPython27\qtgrace_windows_binary\bin\xmgrace.exe
Modify C:\WinPython27\WinPython-64bit-xxx\scripts\own\pyt64.bat, and add to end of file
set PATH=%PATH%;C:\WinPython27\qtgrace_windows_binary\bin
Test installation, by clicking C:\WinPython27\WinPython-64bit-xxx\scripts\own\cmdpyt64.bat, and write
xmgrace
which should start xmgrace.
Python editor
A good lightweight editor for windows could Pyscripter
TEST INSTALLATION
After an installation you should really run an [Installation_test]