Hi Edward.
I have the EPD dist. installed. (Not the Canopy)
(The detailed install instructions, I have specified in the attached text
file.)
I also tried with the winpython dist. yesterday, with the same result.
I am about to try out the win32 distribution of these.
Best
Troels
Troels Emtekær Linnet
2013/5/13 Edward d'Auvergne <[email protected]>
> Hi Troels,
>
> I'm looking at replicating your setup in a virtual machine, but there
> is one piece of information missing. Did you use Anaconda
> (http://continuum.io) or Enthought Python Distribution (EPD,
> https://www.enthought.com/canopy-express/) in combination with
> IPython? This might be where the problem lies, one of these might not
> be compatible with compiling the C modules or may require settings to
> be changes to allow it to run with the MSVS compilers.
>
> Cheers,
>
> Edward
>
>
>
>
> On 12 May 2013 21:21, Edward d'Auvergne <[email protected]> wrote:
> > Hi,
> >
> > Maybe I could try to set up MSVS 2012 tomorrow in a virtual machine with
> > 64-bit Win7 and see if I can reproduce the problem. It is clear that the
> > relax sconstruct script is pointing to all the correct locations. If you
> > type out the compiler commands by hand, they should just work. Therefore
> > the problem is very unlikely to be with relax itself, but rather with the
> > Microsoft 2012 C++ toolchain and/or its interaction with IPython. I'm
> > wondering if it is a 64 vs. 32-bit mismatch issue. Do you have a 64-bit
> > Windows install? Is the compiler toolchain (MSVS) 64-bit? Is the Python
> > version bundled with IPython 64-bit? I really hope the issue is not
> because
> > IPython is incompatible with MSVS! I think we are narrowing the problem
> > down a bit and we should get to the bottom of it soon. For me
> replicating
> > the issue, could you list the exact version and bit number of the
> operating
> > system, MSVS, and IPython.
> >
> > Cheers,
> >
> > Edward
> >
> >
> >
> >
> > On Sunday, 12 May 2013, Troels Emtekær Linnet wrote:
> >>
> >> Hi Edward.
> >>
> >> I have a the file
> >> python27.lib
> >> in C:\Python27\libs.
> >>
> >> I still don't have a clue whats wrong.
> >> Could it be something with Visual C++ 2005 Express Edition?
> >>
> >> I am not sure the installation went correct, since when I do
> >> Windows Start button->Microsoft Windows SDK v7.1->Visual Studio
> >> Registration->Windows SDK Configuration Tool
> >> Change "Installed Windows SDK Versions:" from v7.1 to 8.0
> >> I get an error:
> >> "Your system does not have Visual Studio 2005 or Visual Studio 2008
> >> installed"
> >>
> >> Best
> >>
> >> Troels Emtekær Linnet
> >>
> >>
> >> 2013/5/11 Edward d'Auvergne <[email protected]>
> >>
> >> Hi,
> >>
> >> We should be able to get to the bottom of the problem and make this
> >> run. But setting up the development platform on MS Windows of the
> >> MSVS compiler and Python is always painful. Because of this I set up
> >> a virtual machine image of Windows 2000 with MSVS 2005 many years ago
> >> and have been using this to build the Windows pre-compiled relax
> >> distributions (http://www.nmr-relax.com/download.html#MS_Windows) ever
> >> since. I have updated Python to version 2.7 on this vm, but the
> >> compiler setup works and I don't want to have to set up another
> >> environment.
> >>
> >> From the error messages, it is clear that this 2012 version of the
> >> Microsoft compiler catches more problems in the code. The warning:
> >>
> >> c:\python27\github\relax_disp\target_functions\relax_fit.c(137) :
> >> warning C4700: uninitialized local variable 'params' used
> >>
> >> may be an issue. I think this is harmless, but you could try to
> >> comment out line 137 of that file (the call to the exponential()
> >> function) and see if that makes a difference. This is inside the
> >> dfunc() function which is both non-functional and not used. This is
> >> supposed to return the gradient of the exponential curve but is not
> >> implemented yet as simplex optimisation, which does not require the
> >> gradient or Hessian, was sufficient for finding the solution for this
> >> 2 parameter problem.
> >>
> >> From these new messages, it is clear that the Python.h file is being
> >> found. The include /I"C:\Python27\Scripts\..\include" is interesting
> >> as this implies that sys.prefix as seen by scons is set to
> >> "C:\Python27\Scripts\..". Although strange, this may not be an issue.
> >> But when you run Python, you see sys.prefix as "C:\Python27".
> >> Hmmmm.....
> >>
> >> Maybe the problem is not that Python.h cannot be found, but that the
> >> python32.lib file cannot be found. Can you see this file in your
> >> C:\Python27\libs\ directory? You can see that this is used in the
> >> linking command:
> >>
> >> link /nologo /dll /out:target_functions\relax_fit.pyd
> >> /implib:target_functions\relax_fit.lib /LIBPATH:C:\Python27\libs
> >> target_functions\c_chi2.obj target_functions\exponential.obj
> >> target_functions\relax_fit.obj
> >>
> >> On Windows, there should be a python32.lib file in the LIBPATH.
> >>
> >> Regards,
> >>
> >> Edward
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 11 May 2013 12:41, Troels Emtekær Linnet <[email protected]> wrote:
> >> > Hi Edward.
> >> >
> >> > Sigh.
> >> >
> >> > I have looked around for
> >> > "error LNK2019: unresolved external symbol"
> >> > and it seems that many experience the problem.
> >> >
> >> > But there don't seem to be an universal explanation/bug fix.
> >> > And if I find a thing I would like to try, I really don't know where
> to
> >> > start. ? :-)
> >> >
> >> > - "In Visual-Studio most linkage problems are related to forget adding
> >> > .cpp
> >> > files."
> >> > - Url 2, Url3, Url4, Url5, Url6
> >> >
> >> > In the last Url, there is this solution:
> >> > ---
> >> > in the Project properties, set the Platform Toolset to VS2008 (v90)
> and
> >> > the
> >> > correct directories depending on your installation (ie : include =>
> >> > C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program
> Files
> >> > (x86)\Windows Kits\8.0\Include\um;$(IncludePath) and Libraries =>
> >> > C:\Program
> >> > Files (x86)\Windows Kits\8.0\Lib\win8\um\x64;$(LibraryPath)). Don't
> >> > forget
> >> > to set the .lib in Link entries.
> >> > ---
> >> >
> >> > After installation of Visual Studio 2012, I do have the folder:
> >> > C:\Program Files (x86)\Windows Kits\8.0
> >> >
> >> > I have attached a text file, how I have installed until now.
> >> >
> >> > I hope we can break this "annoying behaviour?"
> >> > Where should I look, if .ccp files is added ??
> >> >
> >> > Best
> >> > Troels
> >> > ------------------------
> >> >
> >> > C:\Python27\github\relax_disp>scons clean_all
> >> > scons: Reading SConscript files ...
> >> > scons: done reading SConscript files.
> >> > scons: Building targets ...
> >> > clean_manual_files(["manual_clean"], [])
> >> >
> >> > ##########################################
> >> > # Cleaning up the temporary manual files #
> >> > ##########################################
> >> >
> >> >
> >> >
> >> >
> >> >
>
----------------------------
Install python and necessary packages
----------------------------
I recommend to install a python distribution which is packed with several
packages already.
You could consider winpython, and includes Ipython:
https://code.google.com/p/winpython/
I personally use EPD.
If you have a uni mail, the Enthought Python Distribution it is free of charge,
and includes Ipython.
That have solved all my dependency problems since then, and the packages I need
more, I install with pip, or github.
Register at http://www.enthought.com/.
When you have registered, and logged in to the homepage, navigate to
https://www.enthought.com/repo/epd/installers/
Install "EPD", and not the Canopy software. (As of may 2013, Canopy was still
suffering from being quite new.)
Make sure, that the path to python scripts are included in your PATH, which can
be changed in computer Environment Variables.
Include in path: C:\Python27;C:\Python27\Scripts
To install packages:
Open a cmd window.
> easy_install pip
> pip search lmfit
> pip install lmfit
> pip freeze (to see installed packages)
If you have problems, check your path, Write in command
> path
> where python
> where easy_install
----------------------------
Install scons for building
----------------------------
Some packages in EPD, can be a version old. So install the newest scons.
Get the Windows Installer from: http://www.scons.org/download.php
As of May 2013, this was version 2.3
Due to a bug, versions of scons <=2.3 should alter a line in:
C:\Python27\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py
Line 364: if not req_target_platform and target_platform in ('amd64','x86_64'):
Should be: if target_platform in ('amd64','x86_64'):
----------------------------
Install Visual Studio Express 2012
----------------------------
From
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
Download:
http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop
Make sure the path to the compiler "cl" is in your PATH.
Include in path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
For a test, start a cmd. And write:
> "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall"
> (Sets variables right)
> cl (Just to test)
----------------------------
Install minfx and Subversion checkout of relax
----------------------------
Download "minfx" from http://download.gna.org/minfx/
Unzip latest version.
In the unpacked folder, hold "Shift", right-click, "Open command window here"
> python setup.py install
Install a subversion client.
For example: http://tortoisesvn.net/
Right click in any folder, and select:
SVN Checkout. Write the path:
svn://svn.gna.org/svn/relax/trunk
svn://svn.gna.org/svn/relax/branches/relax_disp/
----------------------------
Build relax
----------------------------
Navigate to the folder where you have checked out relax
In the folder, hold "Shift", right-click, "Open command window here"
> scons
BUILD PROBLEMS
----------------------------
Coding environment
----------------------------
A lightweight editor, could be pyscripter.
This helps with syntax high-lighting and includes the interpreter.
Install from:
https://code.google.com/p/pyscripter/
Remember to check that indention is set to equal 4 spaces " ", under
Tools/Options/Editor Options
Also set: Run/Python Engine/Remote (Tk) (Matplotlib uses the Tk)
Test that everything is working, for example by this script, and hit the green
play button.
--
from pylab import *
a = array(range(10))
b = 10*a
plot(a,b)
show()_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel