Open darkjhesus opened 4 years ago
Finally I could do it. Thanks.
Would it be possible to write a short guide on how to compile for python and correctly install? I'm having trouble with this. Thank you
ESTE PROCESO SE LO DEBE REALIZAR EN UN SISTEMA OPERATIVO 32 BITS YA QUE, AL REALIZARLO EN UN SO DE 64 BITS, NO FUNCIONA. ESTE TUTORIAL SE LO REALIZO EN WINDOWS 7 32 BITS SERVIPACK 1 ACTUALIZADO
1) Instalar los siguientes programas CMAKE MINGW Swig Python 3.6.8 Asegurarse que estos programas esten en el path del sistema tal como se muestra a continuaciòn: C:\Python36\Scripts\;C:\Python36\;C:\Python36\libs;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\swigwin-4.0.1;C:\MinGW\bin
2) Abrir la aplicaciòn Mingw y descargar todos los paquetes bàsicos 4) Descargar libiec61850 dese el siguiente enlace: https://github.com/mz-automation/libiec61850
5) Abrir la aplicaciòn CMAKE y en source especificar en donde se guardo la libraria libiec61850, en build the binaries especificar la carpeta en donde se va a guardar 6) En CMAKE presionar el boton configure y selecciona MinGW Makefiles, presionar finish. 7) En la ventana que aparece seleccionar BUILD_PYTHON_BINDINGS y deseleccionar BUILD_EXAMPLES ya que si se selecciona esto genera un error 8) Presionar nuevamente configure y luego generate. 9) A traves de cmd ir a la carpeta donde se guardo los archivos binaries del paso 5) y ejecuta el siguiente còdigo mingw32-make 10) Se crearàn 2 archivos _iec61850.pyd e iec61850.py, estos arvivos copiar en la direcciòn C:\Python36\Lib\site-packages
NOTA: Se recomienda utilizar python 3.6 32 bits.
You can find the generated python library in the next link:
https://mega.nz/folder/SdkjzDCD#fVmTCG9d7NGhd-OV_uY_fA
This library is tested in Python 3.6.8 32 bits, in Python 3.8 does not work.
Thank you! I will try to make it but in the meantime your compiled libraries will come in very handy. Since I'm not a developer but a protection/SCADA guy it may take some time. I have a another question - I copied the files you provided in C:\Users\myprofile\AppData\Local\Programs\Python\Python36-32\Lib\site-packages. Importing iec61850.py gives:
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import iec61850 Traceback (most recent call last): File "
", line 1, in File "C:\Users\myprofile\AppData\Local\Programs\Python\Python36-32\lib\site-packages\iec61850.py", line 15, in import _iec61850 ImportError: DLL load failed: The specified module could not be found.
Do you know what could be the problem? I'm running on x64 PC, will try on x86 in VM. Dependency walker for _iec61850.pyd gives a bunch of errors. Am I missing something, and will it go away if I compile everything on my PC?
Thank you
On Wed, May 27, 2020 at 5:46 PM darkjhesus notifications@github.com wrote:
Building on windows with GOOSE support
To build the library and run libiec61850 applications with GOOSE support on Windows (7/8/10) the use of a third-party library (winpcap) is required. This is necessary because current versions of Windows have no working support for raw sockets. You can download winpcap here ( http://www.winpcap.org).
Download and install winpcap. Make sure that the winpcap driver is loaded at boot time (you can choose this option at the last screen of the winpcap installer).
Reboot the system (you can do this also later, but you need to reboot or load the winpcap driver before running any llibiec61850 applications that use GOOSE).
Download the winpcap developers pack from here ( http://www.winpcap.org/install/bin/WpdPack_4_1_2.zip)
Unpack the zip file. Copy the folders Lib and Include from the WpdPack directory in the third_party/winpcap directory of libiec61850
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mz-automation/libiec61850/issues/233#issuecomment-634752165, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXIXLMTSF6CRSDZQJHI2LDRTUYURANCNFSM4MYEWJRA .
I have the same problem when try to import the library with python 3.8 32 bits, I am not sure how to solve your problem but I could share with you the complete python 36 folder, maybe it could fix your problem:
https://mega.nz/file/rYsz2CKJ#vdRR47qzBptJGMMvhHAfYqXTkZSGLKuG1E0tqZVwNrI
It doesn't work either. I will make some effort to compile everything from scratch in 32-bit VM and see where it takes me. Thank you for your support
Dear, I am trying to install the libiec61950 in Python 3.8 64 bits windows 10, apparently the process finished completley, but when I import the module in python, an error occurred, the library is not found. Could you give me a explanation how to add the library to python in my laptop?