[Python.NET] homebrew pythonnet, versus pip install --pre pythonnet

Adam Klein aklein at bluemountaincapital.com
Wed Jun 4 01:28:33 CEST 2014


Confirmed that commit

b65fa30c7b21cce263ed9ada982bd47bc18eea04 Use Assembly.Load(Byte[]) instead of Assembly.LoadFrom.

leads to the behavior below for me ... and prior to that, things work. Any suggestions would be welcome.

From: Adam Klein
Sent: Tuesday, June 03, 2014 7:23 PM
To: pythondotnet at python.org
Subject: RE: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet

I think I found one problem ... in FindAssembly (in assemblymanager.cs), the name it passes for assembly dependencies seems to be of the following form:

  "c:\\path\\Assembly, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"

It therefore fails to find the assembly...

From: PythonDotNet [mailto:pythondotnet-bounces+aklein=bmcm.com at python.org] On Behalf Of Adam Klein
Sent: Tuesday, June 03, 2014 7:02 PM
To: pythondotnet at python.org<mailto:pythondotnet at python.org>
Subject: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet

Hi All,

Amazing library, first of all!

I am experimenting with integrating ipython / numpy / pandas for interactive data analysis with our large existing C# codebase. We are using the Anaconda 2.0 release from ContinuumIO. With `pip install -pre pythonnet`, everything goes as expected (great!)

However, when I build from source (in VS2013), point my PYTHONPATH to the clr.pyd and Python.Runtime.dll that results from the build, and run my ipython, I can do `import clr` and `ref = clr.AddReference("assemblyname")`, but I cannot load any modules within this assembly. I get a `ImportError: No module named ...` Furthermore, if I try to do ref.ExportedTypes, I get a `FileNotFoundException: Could not load file or assembly ...` where it cannot find an assembly that is referenced by the original assembly. There must be some broken loading going on... Any thoughts why this might have different behavior than what I install via PyPI (https://pypi.python.org/pypi/pythonnet/2.0.0.dev1)? Or, hints on how to debug?

Thanks!!!

--Adam

________________________________

This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, the information in this e-mail by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer.

This communication is for informational purposes only. It is not intended as and does not constitute an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any expected returns are provided for illustrative purposes only and are not intended to serve as, and must not be relied upon by any prospective investor as, a guaranty, an assurance, a prediction of a definitive statement of fact or a probability. Investment in funds managed by BlueMountain carries certain risks, including the risk of loss of principal. Unless indicated otherwise, performance results are presented net of fees and expenses. Certain market and economic events having an impact on performance may not repeat themselves. Any comments or statements made herein do not necessarily reflect those of BlueMountain Capital Management, LLC or its affiliates. PAST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS AND NO REPRESENTATION IS MADE THAT RESULTS SIMILAR TO THOSE SHOWN CAN BE ACHIEVED.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20140603/e4f2e8dd/attachment-0001.html>


More information about the PythonDotNet mailing list