[Python.NET] How to use Python for .NET? Have a problem to use in Windows 2008 R2 SP1
brad at fie.us
brad at fie.us
Fri Mar 22 21:51:27 CET 2013
python27.dll is likely not in your path. So it can't dynamically link to it. There are a lot of ways to remedy that.
Adding your python 2.7 install to your path.
Or moving the pythonnet binaries into your python 2.7 install.
You could also edit the .config file for the pythonnet install to give it an absolute path to the python2.7 on your system.
Adding python2.7 to your system directory probably isn't the best idea. If python 2.7 were meant to be installed to the "system" it would install there itself.
A long time ago, I used to make it a point to install my python from "activestate" installers rather than the default python installers, because their installer set up the bin and path variables for me and made sure that python was available system wide.
On Mar 22, 2013, at 4:44 PM, Seungweon Park <swpark71 at gmail.com> wrote:
> I just downloaded pythonnet-2.0-Beta0-clr4.0_140_py27.zip from http://sourceforge.net/projects/pythonnet/, and extract to c:\temp and ran nPython.exe, got below error.
> Current my test machine has
> Windows 2008 R2 SP1 with Python 2.7.3 (32bit).
> When looked the error, and googled it. someone says I need to copy python27.dll into c:\windows\system32. However, I can't find the file. Any idea?
> Thank you,
> Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'python27': The specified module could not be found
> . (Exception from HRESULT: 0x8007007E)
> at Python.Runtime.Runtime.Py_Initialize()
> at Python.Runtime.Runtime.Initialize() in D:\Users\Barton\Documents\Visual Studio 2010\Projects\PySharp\trunk\pythonn
> et\src\runtime\runtime.cs:line 78
> at Python.Runtime.PythonConsole.Main(String args) in D:\Users\Barton\Documents\Visual Studio 2010\Projects\PySharp\
> trunk\pythonnet\src\console\pythonconsole.cs:line 21
> Python.NET mailing list - PythonDotNet at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PythonDotNet