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.
It has been a while since I've had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@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.
Right, so the assembly is indeed found in the pythonpath, but other assemblies it depends on transitively (in the same directory) are not loaded as a result of the malformation of the path + name string ... On Jun 3, 2014, at 7:48 PM, "Tribble, Brett" <btribble@ea.com<mailto:btribble@ea.com>> wrote: It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org<mailto:pythondotnet@python.org> Subject: [Python.NET<http://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. _________________________________________________ Python.NET<http://Python.NET> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet
Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com> wrote:
It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC.
From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@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. _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us> wrote:
Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily.
-brad
On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com> wrote:
It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC.
*From:* PythonDotNet [ mailto:pythondotnet-bounces+btribble=ea.com@python.org <pythondotnet-bounces+btribble=ea.com@python.org>] *On Behalf Of *Adam Klein *Sent:* Tuesday, June 03, 2014 4:02 PM *To:* pythondotnet@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. _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Sorry for not being clear – 1) I’m not building on homebrew on mac :) I am building myself using VS2013. 2) Why do I need to use the setup.py? In any case, when I do this, ie running ‘python setup.py build_ext’ command, I get a [Error 5]: Access is denied. A registry access failure perhaps? I couldn’t get this to work… 3) Everything actually works fine, my PYTHONPATH is set correctly, and it finds and loads the DLL assembly I’m trying to load. What is happening is that assembly then references other assemblies in the same path, but then, in FindAssembly (in assemblymanager.cs), the name it passes for those dependencies seems to be of the following form: "c:\\path\\XYZ, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" It then constructs the name "c:\\path\\XYZ, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null.dll" It therefore fails to find the assembly… I confirmed that prior to the commit that changes Load(Byte[]) to LoadFrom(), everything works. That commit is b65fa30c7b21cce263ed9ada982bd47bc18eea04 Use Assembly.Load(Byte[]) instead of Assembly.LoadFrom. I can maybe fix and open a PR if I have time. But it’d be nice to confirm others see this behavior as well. From: PythonDotNet [mailto:pythondotnet-bounces+aklein=bmcm.com@python.org] On Behalf Of Tony Roberts Sent: Wednesday, June 04, 2014 6:15 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us<mailto:brad@fie.us>> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com<mailto:btribble@ea.com>> wrote: It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org<mailto:pythondotnet@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. _________________________________________________ Python.NET<http://Python.NET> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet
Hopefully to save someone a headache in the future: Although I didn’t think it had anything to do with my problem, I was curious why the ‘python setup.py build_ext’ command was failing with ‘[Error 5]: Access is denied’. I put a ‘import ipdb; ipdb.set_trace()’ and found it’s because my tools/nugget/nuget.exe did not have executable permissions. Fixing that, I got a ‘RuntimeError: Windows SDK could not be found.’ This is definitely a lie - I have one installed :) Turns out my registry didn’t reflect what setup.py was trying to do. I changed keys_to_check (line 30) to include r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A\WinSDK-Win32Tools", which is where I put my InstallationFolder key set to “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\”. Everything then compiled. For the problem I’m facing, I’ll open a GitHub issue (and try to fix myself if I can…) From: Adam Klein Sent: Wednesday, June 04, 2014 8:55 AM To: A list for users and developers of Python for .NET Subject: RE: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Sorry for not being clear – 1) I’m not building on homebrew on mac :) I am building myself using VS2013. 2) Why do I need to use the setup.py? In any case, when I do this, ie running ‘python setup.py build_ext’ command, I get a [Error 5]: Access is denied. A registry access failure perhaps? I couldn’t get this to work… 3) Everything actually works fine, my PYTHONPATH is set correctly, and it finds and loads the DLL assembly I’m trying to load. What is happening is that assembly then references other assemblies in the same path, but then, in FindAssembly (in assemblymanager.cs), the name it passes for those dependencies seems to be of the following form: "c:\\path\\XYZ, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" It then constructs the name "c:\\path\\XYZ, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null.dll" It therefore fails to find the assembly… I confirmed that prior to the commit that changes Load(Byte[]) to LoadFrom(), everything works. That commit is b65fa30c7b21cce263ed9ada982bd47bc18eea04 Use Assembly.Load(Byte[]) instead of Assembly.LoadFrom. I can maybe fix and open a PR if I have time. But it’d be nice to confirm others see this behavior as well. From: PythonDotNet [mailto:pythondotnet-bounces+aklein=bmcm.com@python.org] On Behalf Of Tony Roberts Sent: Wednesday, June 04, 2014 6:15 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us<mailto:brad@fie.us>> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com<mailto:btribble@ea.com>> wrote: It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org<mailto:pythondotnet@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. _________________________________________________ Python.NET<http://Python.NET> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet
Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system.
On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com> wrote:
Hi Adam,
that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet
You should build it using the setup.py script and not in the IDE.
There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built.
Best regards, Tony
On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily.
-brad
On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com> wrote:
It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC.
From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@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. _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn’t seem to be the man power to fix all of these things. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Brad Friedman Sent: Wednesday, June 4, 2014 9:49 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net <http://Python.net> is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system. On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com <mailto:tony@pyxll.com> > wrote: Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us <mailto:brad@fie.us> > wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com <mailto:btribble@ea.com> > wrote: It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org <mailto:pythondotnet@python.org> Subject: [Python.NET <http://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> 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. _________________________________________________ Python.NET <http://Python.NET> mailing list - PythonDotNet@python.org <mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET <http://Python.NET> mailing list - PythonDotNet@python.org <mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET <http://Python.NET> mailing list - PythonDotNet@python.org <mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet
Yes. But the problem is: before the migration, those things DID work. And it was the pip/setup.py that needed to be fixed up. It sounds like you’re saying you’ve sacrificed all of it just to get a pip install working for windows. This is extremely troubling. I have not looked at the git branch yet. But now I need to investigate what exactly is going on. On Jun 4, 2014, at 1:46 PM, David Anthoff <anthoff@berkeley.edu> wrote:
Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn’t seem to be the man power to fix all of these things.
From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Brad Friedman Sent: Wednesday, June 4, 2014 9:49 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet
Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system.
On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com> wrote:
Hi Adam,
that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet
You should build it using the setup.py script and not in the IDE.
There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built.
Best regards, Tony
On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily.
-brad
On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com> wrote:
It has been a while since I’ve had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC.
From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@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. _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Ok, actually we are talking past each other. The problem Adam had apparently has nothing to do with the migration or the pip stuff, it probably is just caused by a bug introduced in a recent commit, the code Adam identified. We should fix that once we have figured out all the details. As far as I can tell building from VS still works, none of the changes made should cause a problem for that. If they did, we should fix them, but so far I am not aware of anything that broke building from VS. I also want to stress that what we have on github right now is not a released version. We are slowly working towards a release. If you find bugs or regressions in the prerelease version, please help us to fix them. The best way to make sure things work in your environment is to test and help out. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Bradley Friedman Sent: Wednesday, June 4, 2014 11:36 AM To: pythondotnet@python.org Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Yes. But the problem is: before the migration, those things DID work. And it was the pip/setup.py that needed to be fixed up. It sounds like you're saying you've sacrificed all of it just to get a pip install working for windows. This is extremely troubling. I have not looked at the git branch yet. But now I need to investigate what exactly is going on. On Jun 4, 2014, at 1:46 PM, David Anthoff <anthoff@berkeley.edu <mailto:anthoff@berkeley.edu> > wrote: Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn't seem to be the man power to fix all of these things. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Brad Friedman Sent: Wednesday, June 4, 2014 9:49 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET <http://Python.NET> ] homebrew pythonnet, versus pip install --pre pythonnet Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. <http://python.net/> Python.net is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system. On Jun 4, 2014, at 6:15 AM, Tony Roberts < <mailto:tony@pyxll.com> tony@pyxll.com> wrote: Hi Adam, that 2.0.0.beta1 build was built from the source on github here: <https://github.com/pythonnet/pythonnet> https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman < <mailto:brad@fie.us> brad@fie.us> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett < <mailto:btribble@ea.com> btribble@ea.com> wrote: It has been a while since I've had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [ <mailto:pythondotnet-bounces+btribble=ea.com@python.org> mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: <mailto:pythondotnet@python.org> pythondotnet@python.org Subject: [ <http://python.net/> 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> 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. _________________________________________________ <http://python.net/> Python.NET mailing list - <mailto:PythonDotNet@python.org> PythonDotNet@python.org <https://mail.python.org/mailman/listinfo/pythondotnet> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ <http://python.net/> Python.NET mailing list - <mailto:PythonDotNet@python.org> PythonDotNet@python.org <https://mail.python.org/mailman/listinfo/pythondotnet> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ <http://python.net/> Python.NET mailing list - <mailto:PythonDotNet@python.org> PythonDotNet@python.org <https://mail.python.org/mailman/listinfo/pythondotnet> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ <http://python.net/> Python.NET mailing list - <mailto:PythonDotNet@python.org> PythonDotNet@python.org <https://mail.python.org/mailman/listinfo/pythondotnet> https://mail.python.org/mailman/listinfo/pythondotnet
Agreed - had no problem building in VS. I did have some problems in setup.py, that I pointed out (but only having to do with my registry keys not aligning with what the script expected). I'm learning a lot from the source code, and the way it "just works" from cpython really is mind blowing. Kudos once again. From: PythonDotNet [mailto:pythondotnet-bounces+aklein=bmcm.com@python.org] On Behalf Of David Anthoff Sent: Wednesday, June 04, 2014 3:38 PM To: 'A list for users and developers of Python for .NET' Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Ok, actually we are talking past each other. The problem Adam had apparently has nothing to do with the migration or the pip stuff, it probably is just caused by a bug introduced in a recent commit, the code Adam identified. We should fix that once we have figured out all the details. As far as I can tell building from VS still works, none of the changes made should cause a problem for that. If they did, we should fix them, but so far I am not aware of anything that broke building from VS. I also want to stress that what we have on github right now is not a released version. We are slowly working towards a release. If you find bugs or regressions in the prerelease version, please help us to fix them. The best way to make sure things work in your environment is to test and help out. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Bradley Friedman Sent: Wednesday, June 4, 2014 11:36 AM To: pythondotnet@python.org<mailto:pythondotnet@python.org> Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Yes. But the problem is: before the migration, those things DID work. And it was the pip/setup.py that needed to be fixed up. It sounds like you're saying you've sacrificed all of it just to get a pip install working for windows. This is extremely troubling. I have not looked at the git branch yet. But now I need to investigate what exactly is going on. On Jun 4, 2014, at 1:46 PM, David Anthoff <anthoff@berkeley.edu<mailto:anthoff@berkeley.edu>> wrote: Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn't seem to be the man power to fix all of these things. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Brad Friedman Sent: Wednesday, June 4, 2014 9:49 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET<http://Python.NET>] homebrew pythonnet, versus pip install --pre pythonnet Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net<http://python.net/> is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system. On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com<mailto:tony@pyxll.com>> wrote: Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us<mailto:brad@fie.us>> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com<mailto:btribble@ea.com>> wrote: It has been a while since I've had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org<mailto:pythondotnet@python.org> Subject: [Python.NET<http://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. _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet
+1 for this comment I'm learning a lot from the source code, and the way it "just works" from cpython really is mind blowing. Kudos once again. In case anyone here is interested I gave a lightning talk on python.NET at PyCon in Montreal in April: http://pyvideo.org/video/2680/lightning-talks-friday-afternoon My talk is around the 37 minute mark of the video. Thanks to everyone who made this magic possible. From: PythonDotNet [mailto:pythondotnet-bounces+jgill=tokiomillennium.com@python.org] On Behalf Of Adam Klein Sent: Wednesday, June 04, 2014 6:18 PM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Agreed - had no problem building in VS. I did have some problems in setup.py, that I pointed out (but only having to do with my registry keys not aligning with what the script expected). I'm learning a lot from the source code, and the way it "just works" from cpython really is mind blowing. Kudos once again. From: PythonDotNet [mailto:pythondotnet-bounces+aklein=bmcm.com@python.org] On Behalf Of David Anthoff Sent: Wednesday, June 04, 2014 3:38 PM To: 'A list for users and developers of Python for .NET' Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Ok, actually we are talking past each other. The problem Adam had apparently has nothing to do with the migration or the pip stuff, it probably is just caused by a bug introduced in a recent commit, the code Adam identified. We should fix that once we have figured out all the details. As far as I can tell building from VS still works, none of the changes made should cause a problem for that. If they did, we should fix them, but so far I am not aware of anything that broke building from VS. I also want to stress that what we have on github right now is not a released version. We are slowly working towards a release. If you find bugs or regressions in the prerelease version, please help us to fix them. The best way to make sure things work in your environment is to test and help out. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Bradley Friedman Sent: Wednesday, June 4, 2014 11:36 AM To: pythondotnet@python.org<mailto:pythondotnet@python.org> Subject: Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet Yes. But the problem is: before the migration, those things DID work. And it was the pip/setup.py that needed to be fixed up. It sounds like you're saying you've sacrificed all of it just to get a pip install working for windows. This is extremely troubling. I have not looked at the git branch yet. But now I need to investigate what exactly is going on. On Jun 4, 2014, at 1:46 PM, David Anthoff <anthoff@berkeley.edu<mailto:anthoff@berkeley.edu>> wrote: Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn't seem to be the man power to fix all of these things. From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org] On Behalf Of Brad Friedman Sent: Wednesday, June 4, 2014 9:49 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET<http://Python.NET>] homebrew pythonnet, versus pip install --pre pythonnet Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net<http://python.net/> is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system. On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com<mailto:tony@pyxll.com>> wrote: Hi Adam, that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet You should build it using the setup.py script and not in the IDE. There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built. Best regards, Tony On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us<mailto:brad@fie.us>> wrote: Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily. -brad On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com<mailto:btribble@ea.com>> wrote: It has been a while since I've had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:02 PM To: pythondotnet@python.org<mailto:pythondotnet@python.org> Subject: [Python.NET<http://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. _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET<http://python.net/> mailing list - PythonDotNet@python.org<mailto:PythonDotNet@python.org> https://mail.python.org/mailman/listinfo/pythondotnet This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster@tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ******************************************
The projects/solutions still work the same as they did before, but I always found the different targets a bit hit and miss as to how consistently they were set up. Setup.py builds using msbuild and (more or less) the same solution file that was there previously. You can still load it into visual studio. Setup.py sets some build options according to the version of python being used. I suggested using setup.py as that's what I consider the most reliable/reproducible method. You don't need to build it in an IDE in order to embed python. You should be able to just add a reference to the assembly built as part of the setup.py build. On Wednesday, June 4, 2014, Bradley Friedman <brad@fie.us> wrote:
Yes. But the problem is: before the migration, those things DID work. And it was the pip/setup.py that needed to be fixed up. It sounds like you’re saying you’ve sacrificed all of it just to get a pip install working for windows. This is extremely troubling. I have not looked at the git branch yet. But now I need to investigate what exactly is going on.
On Jun 4, 2014, at 1:46 PM, David Anthoff <anthoff@berkeley.edu <javascript:_e(%7B%7D,'cvml','anthoff@berkeley.edu');>> wrote:
Pull requests to fix this are more than welcome :) I agree that building from the IDE should also work, but right now there doesn’t seem to be the man power to fix all of these things.
*From:* PythonDotNet [ mailto:pythondotnet-bounces+anthoff=berkeley.edu@python.org <javascript:_e(%7B%7D,'cvml','pythondotnet-bounces%2Banthoff%5Cx3dberkeley.edu@python.org');> ] *On Behalf Of *Brad Friedman *Sent:* Wednesday, June 4, 2014 9:49 AM *To:* A list for users and developers of Python for .NET *Subject:* Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet
Umm. As an asside: seriously? You are only supporting setup.py builds from this branch? That's a problem. Python.net <http://python.net/> is also used to embed python. Therefore, it should build from IDE on all platforms and also from an autotools system.
On Jun 4, 2014, at 6:15 AM, Tony Roberts <tony@pyxll.com> wrote:
Hi Adam,
that 2.0.0.beta1 build was built from the source on github here: https://github.com/pythonnet/pythonnet
You should build it using the setup.py script and not in the IDE.
There are CI builds setup for both windows and linux (see README.md) if you want to see exactly how the wheel gets built.
Best regards, Tony
On Wed, Jun 4, 2014 at 3:48 AM, Bradley Friedman <brad@fie.us> wrote:
Can you provide the contents of the ".Config" file that is built with your particular build solution? There's a pretty good chance that the "FileNotFound" is actually mono trying to link back to Python shared libraries. Though to be honest, debugging is going to be your best bet here. You might try building in Xamarin or MonoDevelop on the mac, to be able to debug more easily.
-brad
On Jun 3, 2014, at 7:15 PM, Tribble, Brett <btribble@ea.com> wrote:
_________________________________________________ Python.NET <http://python.net/> mailing list - PythonDotNet@python.org <javascript:_e(%7B%7D,'cvml','PythonDotNet@python.org');> https://mail.python.org/mailman/listinfo/pythondotnet
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@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 7:02 PM To: pythondotnet@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.
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@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@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 7:02 PM To: pythondotnet@python.org<mailto:pythondotnet@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.
participants (7)
-
Adam Klein -
Brad Friedman -
Bradley Friedman -
David Anthoff -
John Gill -
Tony Roberts -
Tribble, Brett