Subscribe to this thread
Home - General / All posts - IronPython 2.7.8
tjhb

8,167 post(s)
#26-Apr-18 01:37

This post gives instructions for installing IronPython 2.7.8 for use with Manifold 9. (Earlier instructions, for IronPython 2.7.7 are given here.)

IronPython 2.7.8 was released in February 2018.

The main changes which are relevant to setup:

  • The release is now found here (moved slightly within GitHub).

  • IronPython is now installed to Program Files, not to Program Files (x86).

  • The .msi now only installs .NET assemblies for .NET 4.5. They are the only assemblies needed to work with Manifold 9 (or 8). If you need assemblies for some other version (now including .NET Core), you can add these from the .zip installation.
  • .NET assemblies are now installed to the IronPython root folder, not to Platforms subfolders.

    This time I'm only giving one installation method, using hardlinks. (That avoids having to test and specify exactly which assemblies and related files would have to be copied.)


    To add IronPython to Manifold 9:

    • Install IronPython 2.7.8 from the .msi.
    • Note the path to the installed location, normally C:\Program Files\IronPython 2.7 on 64-bit Windows.
    • Note the path to the Manifold 9 installation (installed or portable).
    • Open an administrative command prompt.
    • For a full Manifold installation, enter a command like

      mklink /j "C:\Program Files\Manifold\v9.0\shared\IronPythonNet278" "C:\Program Files\IronPython 2.7"

    • For a full Manifold installation, enter a command like

      mklink /j "D:\manifold-9.0.166.6-x64\shared\IronPythonNet278" "C:\Program Files\IronPython 2.7"

      adjusting the Manifold paths as necessary. The name "IronPython278" can be anything you want.

      (NB the commands above should be all on one line.)

    This creates an NTFS hard link (or directory junction) for the IronPython folder inside the Manifold folder, without making new copies of any files. Manifold sees the full IronPython installation exactly as if it were contained in the Manifold "shared" subfolder. If you later update the IronPython installation, Manifold will see the new version.

  • rk
    271 post(s)
    #26-Apr-18 17:36

    Thanks a lot.

    One side effect is that every .py file from "C:\Program Files\IronPython 2.7" tree gets listed under Add-ins menu.

    Attachments:
    every_py_script.png

    tjhb

    8,167 post(s)
    #26-Apr-18 18:40

    That's not good, thanks Riivo. I hadn't noticed the side effect (which is natural and, in retrospect, expected).

    (Of course it would be the same if we copied the IronPython installation into the Manifold path.)

    So, a better linking method is required. Selective.

    tjhb

    8,167 post(s)
    #26-Apr-18 19:23

    My initial expectation is that Manifold 9 only actually needs IronPython.dll, nothing else.

    I'm only worried about the specific version of the dynamic language runtime. Should that be included as well?

    If we sometimes need items from the standard library (/Lib), then those items must be added explicitly anyway (a matter of Python syntax).

    Being sure requires testing.

    This could be made as easy as it is in Manifold 8.

    adamw

    8,037 post(s)
    #27-Apr-18 09:25

    IronPython.dll itself needs multiple other DLLs.

    We will try to make it work from the default install location without needing to copy anything.

    tjhb

    8,167 post(s)
    #28-Apr-18 00:27

    IronPython.dll itself needs multiple other DLLs.

    Thanks. I'm not sure (I haven't tested enough) whether, given just IronPython.dll, it can always find what it needs through its own registry key at

    HKEY_LOCAL_MACHINE\SOFTWARE\IronPython\2.7\InstallPath

    @="C:\\Program Files\\IronPython 2.7\\"

    By the way, that registry key was moved in 2.7.8 compared with 2.7.7 and earlier. One consequence is that to use to use IronPython with (Python Tools for) Visual Studio, the old version of the key needs to be added after installation.

    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\IronPython\2.7\InstallPath]

    @="C:\\Program Files\\IronPython 2.7\\"

    (IronPython Gitter, PTVS GitHub.)


    For now I am using the IronPython .zip download (portable installation), which still has .NET 4.5 assemblies in a subfolder, with the standard library in a folder beside it (not within it), so making a junction to "Net45" does not import the standard library as Manifold add-ins.

    E.g.

    mklink /j "C:\Program Files\Manifold\v9.0\shared\IronPythonNet278" "D:\X\IronPython 2.7.8\net45"

    or

    mklink /j "D:\manifold-9.0.166.5-x64\shared\IronPythonNet278" "D:\X\IronPython 2.7.8\net45"

    This is more convenient than using the IronPython .msi download for now. Note that we don't need the StdLib .zip download as well. The standard library is included in the full .zip.

    tjhb

    8,167 post(s)
    #28-Apr-18 06:41

    Obvious question: if we are incorporating just the “Net45” folder from the .zip download of IronPython 2.7.8, why not just copy that folder into the Manifold “shared” folder (rather than messing with a folder junction)?

    No reason at all. That’s simpler. The slight advantages of the other method only really apply for a full IronPython installation (.msi).

    The copied “net45” folder can be renamed to something like “IronPython278” if that is clearer.

    So... this thread turned into a bit of a mess, I’m afraid. The main thing I’ve achieved here is to complicate something simple.

    adamw

    8,037 post(s)
    #28-Apr-18 10:51

    I think the thread is pretty helpful. :-)

    The first post still works. Other posts just elaborate on the alternatives.

    lionel

    456 post(s)
    #10-May-18 22:18

    to know if ironpython is already install use console prompt enter in windows search "command prompt" then and enter "ipy" ! . ironpython seem using microsoft installer so easy to remove / de- isntall

    from wikipedia website

    • most Release 2.7.5/6/7 * was released on xxxxxxx , 201x and only consists of bug fixes.
    • Release 2.7.8 was released on February 16, 2018 and consists of bug fixes, reorganized code, and an updated test infrastructure (including significant testing on Linux under Mono). It is also the first release to support .NET Core.

    from ironpython website

    • the ironpython 2.7.8 is compatible with Python 2.7

    regard's

    Attachments:
    ironpython27.png


    join image "Because my dad promised me" interstellar from Manifold: Time by Stephen Baxter. power Math destruction

    Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.