Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rudil opened this issue Mar 24, 2014 · 2 comments
Closed

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

rudil opened this issue Mar 24, 2014 · 2 comments
Labels
Milestone

Comments

@rudil
Copy link

rudil commented Mar 24, 2014

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

@davidanthoff
Copy link
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.

@davidanthoff davidanthoff added this to the 2.0.0 Beta 1 milestone Mar 24, 2014
@rudil rudil closed this as completed Mar 24, 2014
@rudil
Copy link
Author

rudil commented Mar 24, 2014

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants