sdds for python3.5

Moderators: cyao, soliday

PCaminal
Posts: 15
Joined: 02 Nov 2017, 12:26

Re: sdds for python3.5

Post by PCaminal » 07 Aug 2018, 07:33

Hi again Soliday,

I have to upgrade to python3.6 (with anaconda... :? ) and I am trying to use the same file you prepared for python3.5 in this thread.

However, after installation, Python3.6 does not recognize the sdds module. I am just installing the .rpm file with "sudo alien -i SDDSPython3-3.2-1.ubuntu.16.04.x86_64.rpm'.

Could you please give mi a hint if I am forgetting anything?

Thanks a lot in advance and best regards,
Pau

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sdds for python3.5

Post by soliday » 07 Aug 2018, 09:04

I'm out of the office till next week. I believe the anaconda tools install to their own directories. The RPM installs into the system default directory. So you will have to copy the sdds.py etc.. files over to where the anaconca python will find them.

PCaminal
Posts: 15
Joined: 02 Nov 2017, 12:26

Re: sdds for python3.5

Post by PCaminal » 08 Aug 2018, 08:13

So easy was that! Yes, just copying the sdds files into the default anaconda folder worked out.
Thanks a lot!
Cheers,
Pau

felix_armborst
Posts: 10
Joined: 23 Aug 2017, 09:06

Re: sdds for python3.5

Post by felix_armborst » 11 Dec 2018, 12:14

Hi Soliday,

Could you please upload the SDDSPython3 rpm for debian 9 too or am I missing something (https://www.aps.anl.gov/Accelerator-Ope ... uide_Linux)?

Thanks a bunch and cheers,
Felix

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sdds for python3.5

Post by soliday » 11 Dec 2018, 14:05

SDDSPython3-4.0-1.debian.9.6.x86_64.rpm has been added to the web page.

PCaminal
Posts: 15
Joined: 02 Nov 2017, 12:26

Re: sdds for python3.5

Post by PCaminal » 23 Aug 2019, 08:49

Hi Soliday,

I have not been using the sdds module for python for a while. During this time I have installed new packages (PyQt5 and pyqtgraph, among others...). On top of that, I have upgraded to Ubuntu 18.04 and I am using python3.6 (which it shouldn't cause any trouble, I think...).

Then, when I recently have started to use the sdds module again, the floats are truncated, so that all decimals are set to 0. Do you have any idea what could cause this behavior? Is there any known incompatibility with other python modules (if that is possible at all) ?

Thanks a lot in advance!

Best regards,
Pau Gonzalez

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sdds for python3.5

Post by soliday » 23 Aug 2019, 10:15

I just tried loading and saving an SDDS file with Python3.6.8 on Ubuntu 18.04. The decimals didn't get truncated.
Download my example file from https://ops.aps.anl.gov/downloads/pythonExample.sdds
Then run:
python3
import sys, sdds, time
x = sdds.SDDS(0)
x.load('pythonExample.sdds')
x.save('pythonOutput.sdds')
exit()

The output file should be identical to the input file. The file contains multiple data types including floats and doubles.

PCaminal
Posts: 15
Joined: 02 Nov 2017, 12:26

Re: sdds for python3.5

Post by PCaminal » 27 Aug 2019, 10:26

Hi Soliday,
sorry for the late answer, I didn't see that you just answered right away...
Your example also worked for me when doing it in the pure python3 console :-), but it doesn't work when running it in the ipython3 (which is what I am using the most). It happens the same with the scripts and classes I have written using the sdds extensions: they work now on the pure python3 console but not in the ipython3 one...
I am afraid I have to dig a bit more in my computer settings...
Thanks a lot for taking the time to check it! :-)
Cheers,
Pau

Post Reply