[Python.NET] C# path for 3rd-party libraries?

Tribble, Brett btribble at ea.com
Wed Jul 24 00:07:09 CEST 2013


I think you can register them in the GAC as well, but this is a pain in the butt to maintain.

http://en.wikipedia.org/wiki/Global_Assembly_Cache

From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Jason Sachs
Sent: Tuesday, July 23, 2013 2:06 PM
To: pythondotnet at python.org
Subject: Re: [Python.NET] C# path for 3rd-party libraries?

Never mind, I figured it out, you just have to make sure the .dll files are in the PYTHONPATH.

On Tue, Jul 23, 2013 at 1:45 PM, Jason Sachs <jmsachs at gmail.com<mailto:jmsachs at gmail.com>> wrote:
I got the pythonnet libraries installed and working with my Python installation, and I can do

  import clr
  import System

without errors, but when I go to import a 3rd-party .NET library I have installed, it can't find it:

>>> import clr
>>> import System
>>> import OpenLayers.Base
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named OpenLayers.Base
>>>

How do I tell pythonnet where .NET libraries are? I have essentially no background with .NET, I'm familiar with Java so there are a lot of parallels but I don't understand how to make these libraries visible to Python.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20130723/4564a52c/attachment.html>


More information about the PythonDotNet mailing list