PyTango and installation for widows

Hello. I need help with Pytango installation. I have windows 10 64, Visual Studio 2015 and 2017. I've alredy installed tango 9.2.2 , Python 3.6 and numpy. Then I istalled Boost 1.67 (I don't really sure, that Boost was installed right)I tried to install PyTango with PyCharm, but I have error:

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

c:\users\user\appdata\local\temp\pycharm-packaging\pytango\ext\precompiled_header.hpp(19): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: boost/python.hpp: No such file or directory

The same error I have when I try to install it with pip..

Also I tried to install like here
http://www.tango-controls.org/community/forum/c/development/python/pytango-921-installer-for-python3-on-windows/?page=1
but I can't do the last step - building the project because of thousands of errors..
I tried to work with Python 3.3 but my PyCharm wrote that this Python version is unsuported
I tried to work with Python 2.7 - I already installed PyTango for this version of Python, but I can't install numpy neither with PyCharm nor with pip,they both want newer version of Python..
Please,give me good instruction for installation of Pytango for windows 10 64, Python 3.6 and tango 9.2.2

Hi Anna,

I successfully compiled a fully static build ( no further dependencies) of PyTango 9.2.2 a while back using Jimmy's method in the link you posted. I cannot remember exactly what the steps were, but I can provide you a installer .exe or pip wheel (install via >>pip install pytango.whl<< on command line) for Python 3.6 x64.

https://www.dropbox.com/s/e9ho1aao452rvwo/pytango_dist.zip?dl=0

(These are not official binaries!, hope it's OK to post a link)
It might depend on a specific numpy version (mine is 1.13.3) but otherwise no Tango or Boost has to be installed on PC.

I can check my notebook and write up the steps (only slight changes from Jimmy's method) if anyone is interested.

Regards, Lenny
Thanks to Sebastien Gara you can find PyTango windows binaries here
Thank you, Leonard!
I installed with pip .whl file with PyCharm termina. But I still haven't pytango in the package list in PyCharm, so I can't import pytango to my project.
Also I've installed pytango with exe - I have it in installed program list, but I haven't it in PyCharm..
Can I import pytango otherwise, may be?
Hi Anna,

have you added the directory where you installed PyTango to your PYTHONPATH? You can test this by starting python and trying to do:

import tango

Andy
Hi Anna,

I am not familiar with PyCharm, but if the "pip install pytango.whl" successfully completed without any errors this should have added it to the package list and "import tango" should work in python console.

Do you have the python "wheel" package installed (check in PyCharm Project Interpreter)?
What do you mean by PyCharm terminal, the python console (interpreter) or a separate (Windows) command line?

You have two options: from normal (windows) terminal "pip install (…).whl" should work, from inside python console a different approach has to be used:
import pip
pip.main(['install', 'pytango-9.2.2-cp36-none-win_amd64.whl']) #if .whl file is in current directory
from third answer of:
https://stackoverflow.com/questions/39791243/how-do-i-install-a-whl-file-in-a-pycharm-virtualenv

Judging from this link, maybe some virtual environments are confusing it or you may have multiple versions of python installed.

Let me know if this works or if any errors occur (if it went through without errors and you still not have tango in package list, this must be related to multiple python installations or environments).

PS: Tiago, thanks for the link, I read about the Appveyor on the News section but could not find it anywhere obvious on the homepage…
TCoutinho
Thanks to Sebastien Gara you can find PyTango windows binaries here
Thank you all! It works now! I am very happy!smile

Problem was with site-package settings in PyCharm!
Leonard
I can check my notebook and write up the steps (only slight changes from Jimmy's method) if anyone is interested.

Hello Leonard.
That would be kind of you if you can check your notebook and make some kind of installation guide.
I tried to compile PyTango for Python 3.5-win32 using Jimmy's method, but unfortunately it didn't work.
Hi Diego,

I will see what I can do tomorrow. Just as a heads up, I realized in the meantime the fully static version I uploaded above seems faulty. While I did not have any problems using DeviceProxy (client side), weird crashes happened when using multiple threads in python DeviceServers (sorry Anna, hope you are not having too much trouble with this).

When compiling in shared mode, it requires boost and tango binaries to be installed and added on %PATH%, but otherwise is working smoothly right now. Hopefully more on that tomorrow.

Cheers, Lenny
Long story short, I managed to find compiled Windows binaries in NexeyaSGara PyTango fork (thanks to him). Appveyor delete them after 6 months.
The title says it's v9.2.6, but it's v9.2.3. Works fine for now.

https://github.com/NexeyaSGara/pytango/releases/tag/9.2.6

To go in details - it was 4 almost useless days, I tried to compile package for different versions of Python, Visual Studio and Pytango and failed so many times.

Microsoft now want you to login if you want to download their tools. And when I wanted to download older version of Visual Studio, I got "no downloads for you" message.
There is a mess in PyTango.props files, especially "include" and "lib" paths.
Paths in setup.py don't match with Windows install package Tango-9.2.2.
Winsetup.py cmd arguments don't match with setup.py methods. Why it is "build_scripts", but really it is "build_ext"?
Ancient "windows_notes" in doc folder.

If anyone uploaded binaries from link above to PyPi or added it to readme in PyTango repository, it would save so many time for all users.
 
Register or login to create to post a reply.