zoukankan      html  css  js  c++  java
  • Getting started with SciPy for .NET

    Getting started with SciPy for .NET

    1.) IronPython

    Download and install IronPython 2.7, this will require .NET v4.0.

    2.) Modify PATH

    Add the install location on the path, this is usually: C:Program FileIronPython 2.7

    But on 64-bit Windows systems it is: C:Program File (x86)IronPython 2.7

    As a check, open a Windows command prompt and go to a directory (which is not the above) and type:

    > ipy -V
    PythonContext 2.7.0.40 on .NET 4.0.30319.225
    

    3.) ironpkg

    Bootstrap ironpkg, which is a package install manager for binary (egg based) Python packages. Download ironpkg-1.0.0.py and type:

    > ipy ironpkg-1.0.0.py --install
    

    Now the ironpkg command should be available:

    > ironpkg -h
    (some useful help text is displayed here)
    

    4.) scipy

    Installing scipy is now easy:

    > ironpkg scipy
    numpy-2.0.0-1.egg                                           [downloading]
      2.26 MB [.............................................................]
    scipy-1.0.0-1.egg                                           [downloading]
      8.77 MB [.............................................................]
    numpy-2.0.0-1.egg                                            [installing]
      6.97 MB [.............................................................]
    scipy-1.0.0-1.egg                                            [installing]
     25.68 MB [.............................................................]
    

    While downloading, the size of the (compressed) egg file is displayed, whereas, when installing, the installed size (the file-size of all installed files) is displayed. Now scipy is installed into the IronPython environment. You can try importing it by typing:

    > ipy -X:Frames -c "import scipy"


    For those struggling to get numpy/scipy install for ironpythopn, enthought have moved the download link to https://store.enthought.com/repo/.iron/ . The link would only allow you in if you are registered.

    Therefore first up you'd have to register yourself for free, then open the above link, then follow the steps below

    1. Download the IronPython-2.7.msi and install it.

    2. Download ironpkg-1.0.0.py from the above link.

    3. Using command line navigate to the directory where you placed ironpkg-1.0.0.py and run ipy ironpkg-1.0.0.py --install Check whether the install worked using ironpkg -h
    4. The last step is lightly different to the one suggested by enthoughts. Running ironpkg scipy won't work as it looks at the old web address for download. Instead download all the eggs and index-depend.txt from the above link. For installation to work, you would have to modify the download location in the config file to point to the local drive instead of website. The config file can be found at user directory eg.C:UsersNilster.ironpkg . Open it in the textpad and change the location to directory where you downloaded the eggs Eg, mine looks like

      IndexedRepos = ['file://C:WorkPythonEnthought_Eggs',]

    5. Then run the following to install numpy/scipy ironpkg scipy

    6. Check whether the install worked using ipy -X:Frames -c "import scipy"

  • 相关阅读:
    【CLR in c#】事件
    IComparer 指定排序。
    【CLR in c#】属性
    C# Aspect-Oriented Programming(AOP) 利用多种模式实现动态代理
    设计模式六大原则(六): 开闭原则(Open Closed Principle)
    设计模式六大原则(五):迪米特法则(Law Of Demeter)
    设计模式六大原则(四):接口隔离原则(Interface Segregation Principle)
    设计模式六大原则(三):依赖倒置原则(Dependence Inversion Principle)
    设计模式六大原则(二):里氏替换原则(Liskov Substitution Principle)
    设计模式六大原则(一):单一职责原则(Single Responsibility Principle)
  • 原文地址:https://www.cnblogs.com/zeroone/p/5452914.html
Copyright © 2011-2022 走看看