Menu

#598 Import DLL by PyTango failed on windows

closed-fixed
PyTango
5
2013-11-22
2013-03-18
No

Hi,

I installed on windows7 tango binary 64 bit. Then I installed PyTango using instructions on the webpage of PyTango.
After trying to import pytango:
import PyTango
I get this error:
ImportError Traceback (most recent call last)
<ipython-input-1-42d827a8ef4e> in <module>()
----> 1 import PyTango

C:\Python27\lib\site-packages\PyTango\__init__.py in <module>()
119 if os.name == 'nt':
120 __prepare_nt()
--> 121 from ._PyTango import DeviceProxy
122
123 from ._PyTango import (AccessControlType, ApiUtil, ArchiveEventInfo,

ImportError: DLL load failed: The specified module could not be found.

Can somebody give me hint how to fix this? In my PATH variable I have path to tango location but probably some other path is missing.
Thanks a lot for hint!

Patrik

Discussion

  • Carlos Falcon

    Carlos Falcon - 2013-03-18

    Hi Patrik,
    I do not know how did you generated PyTango. If it is well-done the error should be solved adding the different tango dlls to PythonPath/Lib/site-packages/PyTango

    Best, Carlos

     
  • patrik.vagovic

    patrik.vagovic - 2013-03-19

    Hi Carlos,

    I added the dll's to the folder you suggested. Then I realized that it can already find those dll's but my problem now is that I installed 64bit tango system and PyTango binary distribution is 32bit. So I will try to compile on windows 64bit version of PyTango and check again.
    Do you know if there is available 64bit version binary distribution of PyTango for windows. This can solve easily the problem. This windows 32-64bit mess is horrible.

    Thanks a lot

    Patrik

     
  • Tiago Coutinho

    Tiago Coutinho - 2013-03-19

    Hello Patrik,

    Up to now the only PyTango installers available for windows are for 32bits.
    This version uses:
    - python x.y 32bits
    - tango 8.0.z 32bits

    This means that you need to install Tango 8.0.5 for 32bits and also python 32bits.

    We are now in the process of building PyTango 8 for windows 64bits.

    If you can wait a couple of days I think Carlos can have a non official version for you.

    I advise against copying DLLs around because soon you can easily make a mistake of copying the wrong file (32bits instead of 64bits or the other way around) and you loose track of the error.

    Thanks for your patience.

    If you want a solution right now:
    - download and intall Tango 8 32bits
    - add tango to PATH (usually C:\Program Files (x86)\tango\win32\lib\vc9_dll)
    - download and install python x.y 32bits
    - download and install PyTango 8 32bits for python x.y 32bits

    Tiago

     
  • patrik.vagovic

    patrik.vagovic - 2013-03-19

    Hi Tiago,

    thanks for reply. I prefer to wait for 64bit release if it will not take too long.

    I am not very skilled in this Windows mess but does it mean if I will now use 64bit tango + 64bit python and PyTango can I run on such system 32bit tango servers controlled via PyTango 64bit? Or do I need to have separate machine for 32 bit system or can they run on one 64bit machine? :)

    Thank you.

    Patrik

     
  • Tiago Coutinho

    Tiago Coutinho - 2013-05-18

    Hi,

    Sorry for the late reply:
    The only restriction is on a single machine:
    - if you have tango c++ 32bits you need PyTango 32bits
    - if you have tango c++ 64bits you need PyTango 64bits

    The machine that runs the tango server may have 64bits tango+pytango and the client machine may have 32bits tango+pytango. No problem.

    In fact the client machine and server machine may even have different versions of tango/pytango.

     
  • Tiago Coutinho

    Tiago Coutinho - 2013-05-18

    Fixed in SVN trunk since revision #22685
    It will become visible in next PyTango release 8.0.3
    (hopefully available this week)

    This version will probably include binaries for 32 and 64 bits for different python versions.
    It will also include two flavors:
    - [original] PyTango distribution that depends on an existing tango installation
    - [NEW] PyTango distribution that include tango c++ statically linked. This means
    you won't need to install tango c++ before (unless you need jive, astor and so)

     
  • Tiago Coutinho

    Tiago Coutinho - 2013-05-18
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     
  • Tiago Coutinho

    Tiago Coutinho - 2013-11-22
    • Category: --> PyTango
     

Log in to post a comment.