Skip to content

Missing Python.Runtime in new pre-release version of Python.net #34

Closed

Description

@rudil

Hi!
I have installed (using pip) the new prerelease version of Python.net. If I run python.exe, and do 'import cld' I get a FileLoadException, as shown below:

Microsoft Windows Version 6.3.9600 2013 Microsoft Corporation. All rights reserved.

C:\Users\rudil>python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

import clr

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl
y 'Python.Runtime, Version=4.0.0.1, Culture=neutral, PublicKeyToken=5000fea6cba7
02dd' or one of its dependencies. The located assembly's manifest definition doe
s not match the assembly reference. (Exception from HRESULT: 0x80131040)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod
eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro
spection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code
Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s
tackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntros
pection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar
k& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn
trospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at clrModule.initclr()

Regards,
Rudi

Activity

  1. davidanthoff commented on Mar 24, 2014

    @davidanthoff
    Contributor

    My best guess is that you have some other versions of either clr.pyd or Python.Runtime.dll hanging around in your python installation that do not come from the pip install but from some manual build you did at some other point in time, and that this is messing things up. Can you please try the following: 1) uninstall the version you got via pip ("pip uninstall pythonnet"), 2) search for any remains of a previous attempt to install this in your python directory and all its sub-directories. You should be looking for clr.pyd and Python.Runtime.dll mainly. If there are any copies left anywhere, get rid of them to make sure that when you do import clr later, you are not loading one of these copies. 3) install the pre-release of python.net again via the pip command you already used.

  2. added this to the milestone on Mar 24, 2014
  3. rudil commented on Mar 24, 2014

    @rudil
    Author

    Thank you very much. Worked perfectly.

    Regards,
    Rudi

    On 24 Mar 2014, at 21:10, David Anthoff notifications@github.com wrote:

    My best guess is that you have some other versions of either clr.pyd or Python.Runtime.dll hanging around in your python installation that do not come from the pip install but from some manual build you did at some other point in time, and that this is messing things up. Can you please try the following: 1) uninstall the version you got via pip ("pip uninstall pythonnet"), 2) search for any remains of a previous attempt to install this in your python directory and all its sub-directories. You should be looking for clr.pyd and Python.Runtime.dll mainly. If there are any copies left anywhere, get rid of them to make sure that when you do import clr later, you are not loading one of these copies. 3) install the pre-release of python.net again via the pip command you already used.

    —
    Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions