Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't install the library in Python #233

Open
darkjhesus opened this issue May 3, 2020 · 7 comments
Open

Don't install the library in Python #233

darkjhesus opened this issue May 3, 2020 · 7 comments

Comments

@darkjhesus
Copy link

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?

@darkjhesus
Copy link
Author

Finally I could do it. Thanks.

@slemadin
Copy link

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

@darkjhesus
Copy link
Author

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

  3. Descargar libiec61850 dese el siguiente enlace:
    https://github.com/mz-automation/libiec61850

  4. 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

  5. En CMAKE presionar el boton configure y selecciona MinGW Makefiles, presionar finish.

  6. En la ventana que aparece seleccionar BUILD_PYTHON_BINDINGS y deseleccionar BUILD_EXAMPLES ya que si se selecciona esto genera un error

  7. Presionar nuevamente configure y luego generate.

  8. 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

  9. 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.

@darkjhesus
Copy link
Author

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.

@slemadin
Copy link

slemadin commented May 27, 2020 via email

@darkjhesus
Copy link
Author

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

@slemadin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants