Sardana 2.8.3 build on Windows 10 problem

Good day!

I'm trying to build an environment using: Python 2.7, Sardana 2.8.3
- by reading documentation I saw I need to respect versions for the following pacakges:
ITango = 0.0.1 , lxml >= 2.1 , PyTango >= 7.2.
- I used PyQt4, but I'm not sure if exit dependencies between Taurus version and Python version also with PyQt version (on documentation fr PyQt should work with both PyQt4 and PyQt5).

I end up having this error after trying to run "spock" in comand line
$ spock
MainThread INFO 2020-05-08 10:33:58,250 TaurusRootLogger: Using PyQt4 (v4.11.3 with Qt 4.8.6 and Python 2.7.15)
c:\python27\lib\site-packages\IPython\utils\traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
c:\python27\lib\site-packages\IPython\qt.py:13: ShimWarning: The `IPython.qt` package has been deprecated. You should import from qtconsole instead.
"You should import from qtconsole instead.", ShimWarning)
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\spock.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\sardana\spock\__init__.py", line 34, in main
run()
File "c:\python27\lib\site-packages\sardana\spock\ipython_01_00\genutils.py", line 1363, in run
check_requirements()
File "c:\python27\lib\site-packages\sardana\spock\ipython_01_00\genutils.py", line 565, in check_requirements
import itango
File "c:\python27\lib\site-packages\itango.py", line 3, in <module>
from PyTango.ipython import *
AttributeError: 'module' object has no attribute 'load_ipython_extension'


Cheers ! :)
Edited 1 month ago
Hi Mihai,

- by reading documentation I saw I need to respect versions for the following pacakges:
ITango = 0.0.1 , lxml >= 2.1 , PyTango >= 7.2.

You must have found some outdated docs. Could you pass me a link so I could update it.
In this docs we say:

PyTango < 9 is compatible with itango >= 0.0.1 and < 0.1.0, while higher versions with itango >= 0.1.6.

I imagine you have installed PyTango >= 9.2 (in 9.2 PyTango and itango were separed). Then you must use itango >= 0.1.6.

Note that in the setup.py it is not 100 % well treated.
The install requires simply specify itango>=0.0.1 - I did not know how to do the install_requires conditional based on the installed PyTango version. But in the comments in the code we say about these specific versions depending on the installed PyTango.

Hope this helps!
Cheers,
Zibi

PS. I would recommend you to use the Sardana GitHub project issue tracker - your questions will be more visible to the Sardana developers/users and you may get answers faster.
PS2. Sardana is not very well tested on Windows. So, if you find any problem don't hesitate to report it on GitHub. We will try to solve them ASAP.
Thank you for prompt response and also for advice, I will follow them.

Regarding my PyTango version is 8.0.3. , also Taurus is 4.6.

In my case PyTango < 9 and I have installed itango 0.0.1 so according to instructions from below should be fine if i understand corectly:
9 is compatible with itango >= 0.0.1 and < 0.1.0, while higher versions with itango >= 0.1.6

Should I try to go for itango > 0.0.1 ?
Seems like there is some problem with PyTango 8.0.3. Could you try:


from PyTango.ipython import *


I think that upgrading itango won't help.
If the above import fails I think you will need to upgrade PyTango. We use version 8.1.9 at ALBA and spock works well with itango 0.0.1. Would it be possible to you to upgrade? If yes, I recommend to go for the latest version 9.
If not you won't avoid hacking Sardana code to avoid this problem.
Edited 1 month ago
Good day! :)

Sorry to bother again.
As you suggested I pushed for newest version of pytango (PyTango-9.3.2). Because the manual installing of all packages can be a nightmare sometimes, this time I build it from git:
git clone -b 2.8.3 https://github.com/sardana-org/sardana

Resul of build is here
Collecting sardana
Using cached sardana-2.8.3-py2-none-any.whl (1.0 MB)
Requirement already satisfied: lxml>=2.1 in c:\python27\lib\site-packages (from sardana) (4.5.0)
Processing c:\users\tangodancer\appdata\local\pip\cache\wheels\57\0e\4d\b8d43d6008c0dfdf86d8669b12a68db2acd19c56ba65472490\itango-0.1.6-py2-none-any.whl
Requirement already satisfied: taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12 in c:\python27\lib\site-packages (from sardana) (4.6.1)
Collecting PyTango>=7.2.3
Using cached pytango-9.3.2-cp27-cp27m-win32.whl (2.9 MB)
Requirement already satisfied: IPython>=1.0 in c:\python27\lib\site-packages (from itango>=0.0.1->sardana) (1.1.0)
Requirement already satisfied: numpy>=1.1 in c:\python27\lib\site-packages (from taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (1.16.6)
Requirement already satisfied: pint>=0.8 in c:\python27\lib\site-packages (from taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (0.9)
Requirement already satisfied: future in c:\python27\lib\site-packages (from taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (0.18.2)
Requirement already satisfied: click in c:\python27\lib\site-packages (from taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (7.1.2)
Requirement already satisfied: enum34 in c:\python27\lib\site-packages (from taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (1.1.10)
Requirement already satisfied: six>=1.10 in c:\python27\lib\site-packages (from PyTango>=7.2.3->sardana) (1.14.0)
Requirement already satisfied: pyreadline>=1.7.1 in c:\python27\lib\site-packages (from IPython>=1.0->itango>=0.0.1->sardana) (2.1)
Requirement already satisfied: funcsigs; python_version == "2.7" in c:\python27\lib\site-packages (from pint>=0.8->taurus!=4.0,!=4.1,!=4.3,!=4.4,>=3.12->sardana) (1.0.2)
Installing collected packages: PyTango, itango, sardana
Successfully installed PyTango-9.3.2 itango-0.1.6 sardana-2.8.3


I think is ok until now (at least for me :D )

The wierd part that I do not understand is this when I try to run "spock"
C:\Python27\Scripts\spock.exe requires PyTango 7.2.3. No version installed


One thing to mention I have installed Tango8.1.2 and also i build databes for tests but I don't think this should influence something.
Cheers!
Hi Mihai,

Great news that you decided to go for Tango 9. This way things will be easier to debug..
Now, I think you hit a bug in the recently released PyTango 9.3.2. I just created this issue, let's wait for the confirmation…
Meanwhile, you can downgrade your PyTango to 9.2.1 e.g. pip install PyTango==9.2.1. I tried it and it worked for me.

Also, just to let you know, Sardana 2.8 is the last release compatible with Python 2. For the last year we are working on Sardana 3 compatible only with Pytango 3. It will be released soon (hopefull in a month or so..). The Sardana develop branch reflects all this work and is already quite stable - we use it in production at ALBA. I say it just in case you want to start with it already so you won't need later to follow all the upgrade process.

Also as I mentioned you already there are some bugs on Windows which if annoying to you will be fixed in the develop branch and it will be more efficient to avoid backporting them with hotfix releases to 2.8.
Here you can find list of the known bugs on Windows and the result of the 2.8 release tests on Windows.

Thanks for your interest in Sardana!
 
Register or login to create to post a reply.