Quantcast

Struggling with a library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Struggling with a library

Juanma Belda
Dear all,

I'm a newbie in pythonnet and I have the following problem.
I am trying to load an assembly from a .dll file.
Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2

On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet.

I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others?

Kind regards,

--
Juanma

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Struggling with a library

Tribble, Brett

Do you have the same versions of .NET installed on both machines?

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:pythondotnet-bounces+btribble=[hidden email]] On Behalf Of Juanma Belda
Sent: Tuesday, March 27, 2012 8:52 AM
To: [hidden email]
Subject: [Python.NET] Struggling with a library

 

Dear all,

I'm a newbie in pythonnet and I have the following problem.
I am trying to load an assembly from a .dll file.
Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2

On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet.

I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others?

Kind regards,

--
Juanma


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Struggling with a library

Juanma Belda
Checked. I have Microsfot .NET framework 2.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers.

Kind regards



2012/3/27 Tribble, Brett <[hidden email]>

Go to Windows Update and make sure that all versions of .NET are installed.

 

From: Juanma Belda [mailto:[hidden email]]
Sent: Tuesday, March 27, 2012 12:50 PM
To: Tribble, Brett
Subject: Re: [Python.NET] Struggling with a library

 

Sorry for my ignorance. If I type:

 

print System.Version()

 

I get: 0.0

 

This in the machine where everything rules (I don't have access to the others from home)

 

 

2012/3/27 Tribble, Brett <[hidden email]>

Do you have the same versions of .NET installed on both machines?

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:[hidden email]=[hidden email]] On Behalf Of Juanma Belda
Sent: Tuesday, March 27, 2012 8:52 AM
To: [hidden email]
Subject: [Python.NET] Struggling with a library

 

Dear all,

I'm a newbie in pythonnet and I have the following problem.
I am trying to load an assembly from a .dll file.
Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2

On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet.

I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others?

Kind regards,

--
Juanma

 



_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Struggling with a library

Tribble, Brett

Hmmm, here are a couple more ideas:

 

Are both machines 32 or 64 bit? Are both copies of Python also 32 or 64 bit? You could be attempting to load a 32 bit dll on a 64 bit machine, or visa versa. In theory, if the assembly is C#, or VB.NET, you can compile the assembly for “Any CPU”, and it should work on both. Alternatively, you could use 32bit Python on both machines, and explicitly compile the assembly for x86 (32bit).

 

I have also found that loading assemblies is also much more reliable if the internal namespace of the assembly matches the name of the resulting .dll.

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:pythondotnet-bounces+btribble=[hidden email]] On Behalf Of Juanma Belda
Sent: Thursday, March 29, 2012 1:31 AM
To: [hidden email]
Subject: Re: [Python.NET] Struggling with a library

 

Checked. I have Microsfot .NET framework 2.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers.

 

Kind regards

 

 

2012/3/27 Tribble, Brett <[hidden email]>

Go to Windows Update and make sure that all versions of .NET are installed.

 

From: Juanma Belda [mailto:[hidden email]]
Sent: Tuesday, March 27, 2012 12:50 PM
To: Tribble, Brett
Subject: Re: [Python.NET] Struggling with a library

 

Sorry for my ignorance. If I type:

 

print System.Version()

 

I get: 0.0

 

This in the machine where everything rules (I don't have access to the others from home)

 

 

2012/3/27 Tribble, Brett <[hidden email]>

Do you have the same versions of .NET installed on both machines?

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:[hidden email]=[hidden email]] On Behalf Of Juanma Belda
Sent: Tuesday, March 27, 2012 8:52 AM
To: [hidden email]
Subject: [Python.NET] Struggling with a library

 

Dear all,

I'm a newbie in pythonnet and I have the following problem.
I am trying to load an assembly from a .dll file.
Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2

On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet.

I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others?

Kind regards,

--
Juanma

 

 


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Loading...