How to build PyTango with tango 9.2.2

Hi all

I want to build PyTango with tango 9.2.2 ,but encountered some error

I build PyTango as follow steps:

$ svn co http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk PyTango
$ cd PyTango
$ python3 setup.py build

but build report error (see attached file), error seems related to the "src/boost/cpp/constants.cpp " file in PyTango directory

in PyTango "src/boost/cpp/constants.cpp " file,

consts_scope.attr("API_MissedEvents") = API_MissedEvents;

error: ‘API_MissedEvents’ was not declared in this scope

It seems that can't get API_MissedEvents definition ,but it defined in "include/tango/tango_const.h " file in tango 9.2.2 install directory as :
const char* const API_MissedEvents = "API_MissedEvents";

in tango 8.1.2 , API_MissedEvents is defined as : #define API_MissedEvents "API_MissedEvents") .

so i want to know current PyTango can build with Tango 9.2.2 ?

any help appreciated
Edited 8 years ago
Hi Jimmy,

Latest PyTango code can by found on github.
If you want PyTango 9 you have to use the tango9 branch since the develop branch is still pointing to tango 8.

Hope it helps,

Tiago
Hi Jimmy,
I am not the expert but I had the same need as you did for the Tango Virtual Machine and I did the following:

- installed tango 9.2.2
- check out tango9 branch of PyTango from github (https://github.com/tango-cs/PyTango/tree/tango9)
- built PyTango :
python setup.py build
sudo python setup.py install
- uninstalled PyTango8 to be sure I had only PyTango9

The above steps worked for me and I have PyTango9 working on the Tango VM.

Andy
Thanks TCoutinho, Andy

I had build and install pytango9 on CentOS 7, but when import PyTango, it report error as :

Python 3.4.3 (default, Feb 22 2016, 02:25:35)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyTango
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dev001/py34env/lib64/python3.4/site-packages/PyTango/__init__.py", line 121, in <module>
    from . import _PyTango
ImportError: /lib64/libboost_python.so.1.53.0: undefined symbol: PyClass_Type
>>>

error seems related to boost_python, but not sure!
Hi Jimmy,

I built and tested PyTango9 with python2.7 and libboostpython_1.54. When I try to build it with python3 I get an error about a missing pyconfig.h from libboost. I must be missing something. I will try to fix this and let you know if I can build it for python3.

Andy
Hi Jimmy,

Have you installed boost-python for python 3?

If so, maybe PyTango setup is mixing the libboost-python versions between python 2 and python 3.

Different linux distributions handle libboost-python in different ways.
I already handle debian like distributions in a particular way.
Maybe I will have to do it for CentOS as well.

Could you send me the contents of:

ls -l /lib64/libboost_py*

Thanks in advance
Hi, TCoutinho

I am sure it's Red Hat boost-python's problem, because i installed pytango9 on ubuntu 14.04(tango 9.2.2, python 3.4.3, boost 1.55),all is ok!

I install boost on CentOS 7 as :
$sudo yum install boost-mpich-devel boost-mpich-python
it will also install boost-devel and boost-python (ver 1.53)packages, but i am not sure boost-python is for python 2.x or python 3.x

I will test boost 1.48 on CentOS 7, if I can find the problem i'll let you know!

three month ago i install PyTango 8.1.6(from pypi) in Anaconda3, i have the same problem, so i doubt it's the boost-python's problem.
Edited 8 years ago
 
Register or login to create to post a reply.