Menu

Setting up in Windows 7 using Anaconda

Help
ET
2014-04-20
2015-06-12
  • ET

    ET - 2014-04-20

    I am presently making the switch from Matlab to Python (it has been great until now). Unfortunately, I am now in over my head: I want to implement some simple nonlinear dynamical systems (with some bifurcation analysis). I can do the numerical simulations easily (if slowly) in Matlab, but really want to start doing it in Python for a presentation in two weeks, and want to use PyDSTool (which, from the outside, looks fantastic).

    Has anyone written up anything on getting PyDSTool working in the Anaconda environment in Windows 7?

    Unfortunately, I am not a hacker, and my initial attempts to get PyDSTool working have yielded a fail. I have been (probably incorrectly) following the instructions here:
    http://www2.gsu.edu/~matrhc/GettingStarted.html#head-607f3c0ee247904b85ccb5001f8b0a7ff13392f6

    But frankly I am such a noob I am not sure of all the dependencies, or even if my Python can see my c compiler. I feel I am lost in a labyrinth and will spend the next two weeks in installation hell, which I unfortunately don't have time for right now (but I feel like it's giving in to just do it the easy way in Matlab). Any help anyone can give me I would greatly appreciate it.

    So far I have extracted the PyDSTool folder to C:, added PyDSTool to my Python path, and then (from within the test directory in PyDSTool) I ran the test in the iPython shell with:
    run run_all_tests.py

    And every test failed.

    System info: I am on Windows 7 with Anaconda 1.9.1 (using Spyder/ipython), and use mingw.

    I can switch to Ubuntu, which I already have installed, if I absolutely must, to get this working quickly (though frankly, from my non-hacker eyes, the install instructions look just as complicated at the above site for Linux as for Windows; and I prefer Windows 7 to Ubuntu).

    Cross-posted at:
    https://groups.google.com/a/continuum.io/d/msg/anaconda/IuedB6u54Vc/xky3fofL3DsJ

     
  • Rob Clewley

    Rob Clewley - 2014-04-20

    Hi,

    Here are slightly more current instructions at the site linked to from the main project site. But the main issue is probably the same, regardless. If not one test runs then your system is probably still not seeing PyDSTool. But, is it at least seeing numpy and scipy? When you start iPython, can you successfully run "import numpy" for instance?

    If not, then you have larger configuration problems with Python. What version of Python did you install? The current release of PyDSTool is not yet compatible with Python 3.x but our beta release is, which I can point you to at a separate location. It could also be that you need to deactivate User Account Control (used to be a problem on Vista) before installing Anaconda and, if so, instructions are given on my page linked above.

    Additionally, it sounds like you maybe did only one of the following. You have to edit a PyDSTool.pth file and put it in Python's site-packages folder. You also have to edit the Windows Environment Variable (Control Panel -> System) to add PyDSTool to the Python PATH variable.

    Just try typing "import PyDSTool" from the iPython prompt. Once that works, PyDST is visible, and all the basic tests should then run. We can then talk about mingw in case gcc is not visible for the Dopri/Radau/AUTO tests. But if you can type "gcc --version" anywhere at a command prompt then you should be good to go.

     
  • ET

    ET - 2014-04-20

    Thanks so much for the help! I made the changes you suggested (in particular, for Anaconda, the path file goes into C:\Anaconda\Lib\site-packages), and now don't get an error when I import PyDSTool, and the tests seem to be running (with a gorgeous graph of some action potentials). I will post details later once the tests finish (some of the tests seem to be failing, but many seem to be working!).

    I am so pumped thank you so much for the quick help!

    (Incidentally I am using Python 2.7, and within Anaconda, numpy, scipy, matplotlib are integrated pretty well into the environment so that wasn't the issue--the main changes were in the .pth file and environment variable, neither of which I had done correctly).

     

    Last edit: ET 2014-04-20
  • ET

    ET - 2014-04-20

    The tests all ran, and quite a few seemed to pass, but a lot failed as well. Below is the output when I ran run_all_tests.py (note also gcc is seen by my system: typing in 'gcc --version' yields reasonable output):

    Test scripts that failed:
    test_pointsets.py
    SLIP_2D_maps.py
    poly_interp_test.py
    fingermodel_vode.py
    test_hybrid_extinputs.py
    IF_squarespike_model.py
    IF_delaynet.py
    forced_spring.py
    pest_test3.py
    PyCont_DiscPredPrey.py
    PyCont_Hopfield.py
    PyCont_hybrid_osc.py
    imprecise_event_test.py
    interp_dopri_test.py
    dopri_event_test.py
    HH_model_Cintegrator.py
    HH_loaded_Cintegrator.py
    IF_delaynet_syn.py
    CIN.py
    HH_model_Cintegrator_testbounds.py
    Dopri_backwards_test.py
    test_hybrid_extinputs_Cintegrator.py
    SLIP_2D_pdc.py
    DAE_example.py
    radau_event_test.py
    freefinger_noforce_radau.py
    sloppycell_example.py
    pest_test3_Cintegrator.py
    pest_test4_Cintegrator.py
    PyCont_MorrisLecar_TypeI.py
    PyCont_MorrisLecar_TypeII.py
    PyCont_LPNeuron.py
    PyCont_HindmarshRose.py
    Summary:
    Basic PyDSTool functions: appears to be broken on your system
    Map related modules: appears to be broken on your system
    VODE related modules: appears to be broken on your system
    Symbolic differentiation module: appears to work on your system
    Parameter estimation module: appears to be broken on your system
    PyCont: appears to be broken on your system
    Dopri ODE systems: appears to be broken on your system
    Radau ODE systems: appears to be broken on your system
    Parameter estimation module with external compilers: appears to be broken on your system
    PyCont interface to AUTO: appears to be broken on your system

     
  • Rob Clewley

    Rob Clewley - 2014-04-20

    OK, we're making progress then. But some of the basic tests are failing, which is very unusual. Please run "test_pointsets" and "test_hybrid_extinputs" by hand and post the logs so that I can see what is wrong. It's possibly something fundamental, like a library version incompatibility. Did you check that numpy, scipy, and matplotlib all import OK by hand at the prompt? Please also list the exact versions of your Python and these three libraries. If they import, then numpy.__version__ etc. is the way to find these. Thanks.

     

    Last edit: Rob Clewley 2014-04-21
  • ET

    ET - 2014-04-20

    *Did you check that numpy, scipy, and matplotlib all import OK by hand at the prompt?

    They import without complaint.

    *Please also list the exact versions of your Python and these three libraries.

    Python: 2.7.6 (distributed with Anaconda 1.9.1 (64 bit))
    iPython: version 1.1.0
    Numpy: 1.8.0
    matplotlib: 1.3.1
    scipy: 0.13.3

    *Please run "test_pointsets"

    Below are the last few lines of the log, and the stack trace. I will do same for test_hybrid_extinputs in my next response.

    We can test equality between arrays, as usual:
    w_at_1 != wp(1.).toarray() => [ True True True]
    We can also compare with a Pointset object:
    wp(1.) != w_at_1 => [ True True True]
    But we can't put an array on the left-hand side if a Point or Pointset is on the right.

    To demonstrate appending a Point and Pointset to another Pointset:
    vw.labels --> 1: {c: {}}
    wp.append(vw)
    Traceback (most recent call last):

    File "<ipython-input-35-f8ecbaa2bb3c>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_pointsets.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_pointsets.py", line 151, in <module>
    wp.append(vw)

    File "C:\PyDSTool\Points.py", line 1516, in append
    p_labels.mapIndices(dict(zip(pixs, [i+old_len for i in pixs])))

    File "C:\PyDSTool\Points.py", line 1819, in mapIndices
    self.init(by_index)

    File "C:\PyDSTool\Points.py", line 1801, in init
    raise TypeError("Initialization dictionary must be keyed "

    TypeError: Initialization dictionary must be keyed by integer indices

     

    Last edit: ET 2014-04-20
  • ET

    ET - 2014-04-20

    Output/stack trace for test_hybrid_extinputs:

    t0= 89.1061093019 traj.globalt0= 89.1061093019
    traj.indepdomain = [0.0, 10.893890698109843]
    x: Interval traj_indep_bd [-inf, inf]
    state: Interval traj_indep_bd [-inf, inf]
    inval: Interval traj_indep_bd [-inf, inf]
    Last point of traj test1_8 was: inval: 1.35843140758
    state: 1.0
    x: -2.42614999371
    Warnings: Warning code 21: State or input variable reached bounds (non-terminal)
    Info: t = 100.0, var name = in, var value = None,
    value interval = [-2.9835545266604599, 1.7633274729942017] Warning code 21: State or input variable reached bounds (non-terminal)
    Info: t = 100.0, var name = in, var value = None,
    value interval = [-2.9835545266604599, 1.7633274729942017]
    End reason in test_inputs was ['time']
    Traceback (most recent call last):

    File "<ipython-input-36-c868c41bd158>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_hybrid_extinputs.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_hybrid_extinputs.py", line 118, in <module>
    plotData = test1(m)

    File "C:/PyDSTool/tests/test_hybrid_extinputs.py", line 96, in test1
    return m.sample('test1')

    File "C:\PyDSTool\Model.py", line 1339, in sample
    doEvents, precise)

    File "C:\PyDSTool\Trajectory.py", line 1440, in sample
    pset.append(pset_new, skipMatchingIndepvar=True)

    File "C:\PyDSTool\Points.py", line 1514, in append
    p_labels.mapIndices(dict(zip(pixs, [i+old_len-1 for i in pixs])))

    File "C:\PyDSTool\Points.py", line 1819, in mapIndices
    self.init(by_index)

    File "C:\PyDSTool\Points.py", line 1801, in init
    raise TypeError("Initialization dictionary must be keyed "

    TypeError: Initialization dictionary must be keyed by integer indices

     
  • Rob Clewley

    Rob Clewley - 2014-04-21

    That is strange that you get this error on the same versions that I'm running with no problem. Can you try substituting your PyDSTool/Points.py file with the most up-to-date one here
    on our github repo. If that gives the same error, I'll devise a diagnostic test file that you can try to see where the issue is coming from.

     
  • ET

    ET - 2014-04-21

    I seem to get the same error with the new Points.py file:


    We can test equality between arrays, as usual:
    w_at_1 != wp(1.).toarray() => [ True True True]
    We can also compare with a Pointset object:
    wp(1.) != w_at_1 => [ True True True]
    But we can't put an array on the left-hand side if a Point or Pointset is on the right.

    To demonstrate appending a Point and Pointset to another Pointset:
    vw.labels --> 1: {c: {}}
    wp.append(vw)
    Traceback (most recent call last):

    File "<ipython-input-37-f8ecbaa2bb3c>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_pointsets.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_pointsets.py", line 151, in <module>
    wp.append(vw)

    File "C:\PyDSTool\Points.py", line 1516, in append
    self.indepvararray.resize(new_len)

    File "C:\PyDSTool\Points.py", line 1819, in mapIndices
    for label, infodict in v.iteritems():

    File "C:\PyDSTool\Points.py", line 1801, in init
    if ptlabels is None:

    TypeError: Initialization dictionary must be keyed by integer indices


    Thanks again for going out of your way to help me with this...

     

    Last edit: ET 2014-04-21
  • Rob Clewley

    Rob Clewley - 2014-04-21

    No problem! Weird things sometimes come up and it helps us make the code more robust when there is sometimes an emerging problem with new library versions. So it's very helpful to us. Here's what to do: please edit the new Points.py in a code editor. In front of the existing line 1812 ("if not isinstance(k, _int_types):") add the code "print 'Type is', type(k)". Please report the result that will show right before the same traceback. I have a theory that this won't be a big problem to fix. To test this, you might as well go right ahead and put comment characters in front of that whole 'if' statement that raises the TypeError, and see if the two test files run successfully (then see if the others do too). I'll get back to you later with a fix if it's what I think it might be...

     
  • ET

    ET - 2014-04-21

    Here's what I get when I add "print "ET db check: Type is", type(k)" to the code:


    To demonstrate appending a Point and Pointset to another Pointset:
    ET db check: Type is type 'int'
    vw.labels --> 1: {c: {}}
    wp.append(vw)
    ET db check: Type is type 'int'
    ET db check: Type is type 'long'
    Traceback (most recent call last):

    File "<ipython-input-7-f8ecbaa2bb3c>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_pointsets.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_pointsets.py", line 151, in <module>
    wp.append(vw)

    File "C:\PyDSTool\Points.py", line 1528, in append
    p_labels.mapIndices(dict(zip(pixs, [i+old_len for i in pixs])))

    File "C:\PyDSTool\Points.py", line 1832, in mapIndices
    self.init(by_index)

    File "C:\PyDSTool\Points.py", line 1814, in init
    raise TypeError("Initialization dictionary must be keyed "

    TypeError: Initialization dictionary must be keyed by integer indices


    When I comment out the bit that raises the TypeError exception, I get the following:


    To demonstrate appending a Point and Pointset to another Pointset:
    ET db check: Type is type 'int'
    vw.labels --> 1: {c: {}}
    wp.append(vw)
    ET db check: Type is type 'int'
    ET db check: Type is type 'long'
    Traceback (most recent call last):

    File "<ipython-input-2-f8ecbaa2bb3c>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_pointsets.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_pointsets.py", line 151, in <module>
    wp.append(vw)

    File "C:\PyDSTool\Points.py", line 1529, in append
    self.labels.update(p_labels)

    File "C:\PyDSTool\Points.py", line 2006, in update
    self.update(k, vk, vv)

    File "C:\PyDSTool\Points.py", line 2053, in update
    raise TypeError("Invalid type for update")

    TypeError: Invalid type for update


     
  • Rob Clewley

    Rob Clewley - 2014-04-21

    That's OK, it is actually what I suspected though. It's about the occurrence of the "long" integer on 64 bit platforms. We have only done limited testing in 64 bit environments and for some reason yours is not happy when other 64 bit systems have tested fine. So see if this quick fix works, please. Restore the "if" statement and delete the new "print" statement. In PyDSTool/common.py, around line 102, make the line read thus:

    _int_types = (int, integer, long)
    

    We'll look into this issue more carefully in the meantime. Thanks for your patience!

     
  • ET

    ET - 2014-04-21

    It worked! I'm now running run_all_tests again will post output here.

     
  • ET

    ET - 2014-04-21

    Output of run_all_tests, I'm going to go ahead and run test_interval by hand.


    Test scripts that failed:
    test_interval.py
    poly_interp_test.py
    pest_test3.py
    PyCont_ABCReaction.py
    PyCont_Hopfield.py
    imprecise_event_test.py
    interp_dopri_test.py
    dopri_event_test.py
    HH_model_Cintegrator.py
    HH_loaded_Cintegrator.py
    CIN.py
    HH_model_Cintegrator_testbounds.py
    Dopri_backwards_test.py
    test_hybrid_extinputs_Cintegrator.py
    SLIP_2D_pdc.py
    DAE_example.py
    radau_event_test.py
    freefinger_noforce_radau.py
    sloppycell_example.py
    pest_test3_Cintegrator.py
    pest_test4_Cintegrator.py
    PyCont_MorrisLecar_TypeI.py
    PyCont_MorrisLecar_TypeII.py
    PyCont_LPNeuron.py
    PyCont_HindmarshRose.py
    Summary:
    Basic PyDSTool functions: appears to be broken on your system
    Map related modules: appears to work on your system
    VODE related modules: appears to be broken on your system
    Symbolic differentiation module: appears to work on your system
    Parameter estimation module: appears to be broken on your system
    PyCont: appears to be broken on your system
    Dopri ODE systems: appears to be broken on your system
    Radau ODE systems: appears to be broken on your system
    Parameter estimation module with external compilers: appears to be broken on your system
    PyCont interface to AUTO: appears to be broken on your system

     
  • ET

    ET - 2014-04-21

    Some outputs...

    poly_interp_test:

    File "C:/PyDSTool/tests/poly_interp_test.py", line 34, in <module>
    traj = s.compute('test')

    File "C:\PyDSTool\Generator\Vode_ODEsystem.py", line 686, in compute
    interp = PiecewisePolynomial(alltData, xvals, 2)

    File "C:\PyDSTool\common.py", line 2717, in init
    self.extend(xi[1:],yi[1:],orders)

    File "C:\PyDSTool\common.py", line 2816, in extend
    self.append(xi[i],yi[i],orders)

    File "C:\PyDSTool\common.py", line 2792, in append
    order, self.direction))

    File "C:\PyDSTool\common.py", line 2750, in _make_polynomial
    return KroghInterpolator(xi,yi)

    File "C:\PyDSTool\common.py", line 2338, in init
    Vk[0] = yi[k]/float(spy.factorial(s))

    AttributeError: 'module' object has no attribute 'factorial'


    imprecise_event_test:

    File "C:/PyDSTool/tests/imprecise_event_test.py", line 33, in <module>
    ode = Generator.Dopri_ODEsystem(DSargs)

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 795, in compileLib
    raise RuntimeError

    RuntimeError


    And dopri_event_test:

    File "C:/PyDSTool/tests/dopri_event_test.py", line 58, in <module>
    testODE = Dopri_ODEsystem(DSargs)

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 795, in compileLib
    raise RuntimeError

    RuntimeError

     
  • Rob Clewley

    Rob Clewley - 2014-04-21

    We're overdue for a new SF release anyway, which will fix some of these errors, but scipy's factorial function is now in the 'misc' sub-module. So, file "C:\PyDSTool\common.py", line 2338 should have 'spy.misc.factorial'

    For the other, it's possibly just that you didn't remove the "-m32" flags as per the Getting Started instructions for C-based integrators (sorry, this has been automated in the upcoming release!). If not, it will probably be an unresolved 64-bit issue that has been difficult for us to solve. If you ran it by hand, there should be more text above the error message that is a report from gcc or the linker about what gcc command it ran and what its own error message is.

    But I'd still like to see why test_interval and pest_test3 failed, please.

     
  • ET

    ET - 2014-04-21

    OK poly_interp_test worked after getting the factorial right!


    I then removed the -m32 flags in Dopri_ODEsystem.py, Radau_ODEsystem.py and ContClass.py files. Running the other scripts (and test_interval/pest_test), I got the following...


    imprecise_event_test:

    File "C:/PyDSTool/tests/imprecise_event_test.py", line 33, in <module>
    ode = Generator.Dopri_ODEsystem(DSargs)

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 795, in compileLib
    raise RuntimeError

    RuntimeError


    dopri_event_test:

    File "C:/PyDSTool/tests/dopri_event_test.py", line 58, in <module>
    testODE = Dopri_ODEsystem(DSargs)

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()

    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 795, in compileLib
    raise RuntimeError

    RuntimeError


    test_interval:
    r=Interval('another_singleton', float, 0.0)
    b=Interval('b', int, 0)
    b in m => UncertainValueError: 'cannot determine membership (uncertain) at variable = Interval b'
    i=Interval('i', int, (0,1))
    b in i => True (true because we're comparing integer intervals)
    Traceback (most recent call last):

    File "<ipython-input-3-74f3e1c211c9>", line 1, in <module>
    runfile('C:/PyDSTool/tests/test_interval.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/test_interval.py", line 70, in <module>
    assert i.contains(1) is contained # because discrete-valued interval

    AssertionError


    pest_test3.py:

    [...]
    -5.14622718e-01 -6.62716325e-01 -7.70728160e-01 -7.72288722e-01
    -2.57780966e-03 -1.39670715e-01]
    *** CHOSE pars with residual 7.64717851
    Feature evaluation on solution set-up: False
    geom feat residual: 76.4585250118

    Preparing plots
    Valid coordinate names: ['sptime', 'spval']
    C:\Anaconda\lib\site-packages\sklearn\pls.py:7: DeprecationWarning: This module has been moved to cross_decomposition and will be removed in 0.16
    "removed in 0.16", DeprecationWarning)
    <matplotlib.figure.Figure at="" 0x14494080="">
    Traceback (most recent call last):

    File "<ipython-input-4-29d3f0dd2068>", line 1, in <module>
    runfile('C:/PyDSTool/tests/pest_test3.py', wdir='C:/PyDSTool/tests')

    File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
    execfile(filename, namespace)

    File "C:/PyDSTool/tests/pest_test3.py", line 227, in <module>
    plotData_par = sol_traj.sample(['v'])

    File "C:\PyDSTool\Trajectory.py", line 554, in sample
    res = self.call([self.indepdomain.get()], coords_sorted)

    File "C:\PyDSTool\Trajectory.py", line 351, in call
    raise ValueError("Invalid coordinate names passed")

    ValueError: Invalid coordinate names passed

     
  • Rob Clewley

    Rob Clewley - 2014-04-21

    OK, the non-gcc related problems are minor and are fixed in the upcoming release. They shouldn't stand in your way for now. If the interval issue bites in your own code for any reason, then just update common.py from here.

    You still need to post the full gcc call and error output that you should see above the traceback for those other tests. If it's not visible on your configuration of ipython try running the test using native python:

    python dopri_event_test.py

     
  • ET

    ET - 2014-04-21

    Ah yes ipython wasn't showing that...from command line I see swig is not installed. That's rather embarassing. Working on it now. One thing I got hung up on as I looked at this earlier, is I cannot find my autoexec.bat file in Windows 7. :O

     

    Last edit: ET 2014-04-21
  • ET

    ET - 2014-04-21

    I tried the following to get swig working....


    I extracted swig, added the folder with swig.exe to my python path as well as my system path.

    Then I set the environmental variables:

    PYTHON_INCLUDE: C:\Anaconda\include (this contains Python.h)
    PYTHON_LIB:C:\Anaconda\libs\python27.lib (this is the library for linking?)

    I then restarted my computer, and when I ran it in shell mode got the following:

    c:> python dopri_event_test.py

    Error occurred in generating Dopri system...
    <type 'exceptions.SystemExit'=""> error: command 'swig.exe' failed: No such file or
    directory
    Traceback (most recent call last):
    File "dopri_event_test.py", line 58, in <module>
    testODE = Dopri_ODEsystem(DSargs)
    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()
    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 795, in compileLib
    raise RuntimeError
    RuntimeError


    For some reason, swig is not being recognized. Ugh.

     
  • Rob Clewley

    Rob Clewley - 2014-04-21

    Try plain

    c:> swig

    (or is it 'swig.exe' on Windows? I'm forgetting right now). If it's correctly on the system PATH, this should return an error that there is no input file (or similar). But I suspect that if PyDSTool cannot see it then this test will not work either. Are you sure the bin/ folder containing swig.exe is appended to the system path using Control Panel -> System? Because if it is, then a restarted shell should let you access swig from any directory. Beyond that, your guess is as good as mine :/

     
  • ET

    ET - 2014-04-21

    Ah I forgot I tweaked something and didn't restart my shell....

    Just restarted it and got:


    C:\PyDSTool\tests> python dopri_event_test.py
    Looking for python27.dll
    Cannot build msvcr library: "msvcr90d.dll" not found
    Found executable C:\Anaconda\Scripts\gcc.bat

    Error occurred in generating Dopri system
    (while moving library extension modules to CWD)
    <type 'exceptions.IOError'=""> [Errno 2] No such file or directory: 'C:\PyDSTool\
    tests\dopri853_temp\src.win32-2.7\dopri853_temp\dop853_event_test_vf.py'
    Traceback (most recent call last):
    File "dopri_event_test.py", line 58, in <module>
    testODE = Dopri_ODEsystem(DSargs)
    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 421, in init
    self.compileLib()
    File "C:\PyDSTool\Generator\Dopri_ODEsystem.py", line 841, in compileLib
    raise RuntimeError
    RuntimeError

     

    Last edit: ET 2014-04-21
  • ET

    ET - 2014-04-21

    Apparently a similar issue came up here with msvcr90.d.dll (with Anaconda, no less):
    http://sourceforge.net/p/pydstool/discussion/472291/thread/15b44ab8/

    When I get a free moment today I will look that over.

    Edit: looked it over, it isn't clear (to me) what the issue is. Perhaps Anaconda has issue that some file is missing from this distro? Perhaps related to:
    https://github.com/ContinuumIO/anaconda-issues/issues/21

    Not sure, though.

     

    Last edit: ET 2014-04-21
  • Maurizio De Pitta'

    <removed>

     

    Last edit: Maurizio De Pitta' 2014-05-15
  • Rob Clewley

    Rob Clewley - 2015-06-12

    Just to follow up to concerned parties: I have verified myself that it is not possible to use the C integrators etc. on 64-bit Windows 7 with Anaconda, Pyzo, Python(x,y) etc. See https://gehrcke.de/2015/02/how-to-set-up-a-64-bit-version-of-numpy-on-windows/. Basically, although those systems have gotten numpy to "work" for normal usage, they have done so by compiling everything through the MSVC compiler. This prevents distutils from having access to the appropriate C header files that can be linked when PyDSTool tries to build C-based vector fields using GCC. This is the source of the gcc errors about definitions of "long long" and "uint64", which are far from easy to overcome by hand.

    The only solution for a regular user is to get hold of a compatible MSVC compiler and coercing distutils to use that (see PyDSTool docs for info about adding a compiler flag for distutils) or wait until numpy becomes properly compatible with 64-bit windows.

     
  • Maurício Reis

    Maurício Reis - 2017-10-27

    Hello there,

    I am unearthing this thread as a hope of solution to this issue.

    The only solution for a regular user is to get hold of a compatible MSVC compiler and coercing distutils to use that (see PyDSTool docs for info about adding a compiler flag for distutils) or wait until numpy becomes properly compatible with 64-bit windows.

    Can someone give more details on this?

     

Log in to post a comment.