1

I recently installed python for .net on my 64 bit machine. I followed the instructions from https://github.com/geographika/PythonDotNet. I copied the files from /PythonDotNet202_py27_net4_x64 to C:\Python27\DLLs. However, when I do import clr, I got the error:

ImportError: DLL load failed: %1 is not a valid Win32 application.

The python I have is 64 bit. It looks like it is complaining the clr is 32 bit. However, I got the clr.pyd from the x64 folder. What am I doing wrong?

denfromufa
  • 5,610
  • 13
  • 81
  • 138
BooYaah
  • 51
  • 1
  • 8
  • You need to install pythonnet using pip: `pip install pythonnet`. The official repo is located at github.com/pythonnet/pythonnet – denfromufa Sep 07 '16 at 01:13
  • If you decide to copy manually, then place both `Python.Runtime.dll` and `clr.pyd` to `python\Lib\site-packages` directory. – denfromufa Sep 07 '16 at 01:16

0 Answers0