lneuhaus / pyrpl

pyrpl turns your RedPitaya into a powerful DSP device, especially suitable as a lockbox in quantum optics experiments.
http://lneuhaus.github.io/pyrpl/
MIT License
139 stars 109 forks source link

Python 3.10 not supported? #468

Open parkerlreed opened 2 years ago

parkerlreed commented 2 years ago

Arch Linux

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/parker/pyrpl/pyrpl/__init__.py", line 59, in <module>
    global_config = MemoryTree('global_config', source='global_config')
  File "/home/parker/pyrpl/pyrpl/memory.py", line 507, in __init__
    self._savetimer.setInterval(self._loadsavedeadtime*1000)
TypeError: setInterval(self, int): argument 1 has unexpected type 'float'
clarencesees commented 1 year ago

I'm facing the same problem too.

gsteele13 commented 1 year ago

me too... :(

rolling back to 3.9 and re-installing also did not work :(

File ~/micromamba/pyrpl/lib/python3.9/site-packages/pyrpl/widgets/attribute_widgets.py:677
    672     def _set_widget_value(self, new_value):
    673         self.widget.setCheckState(
    674             self._gui_to_attribute_mapping.inverse[new_value])
--> 677 class DataWidget(pg.GraphicsWindow):
    678     """
    679     A widget to plot real or complex datasets. To plot data, use the
    680     function _set_widget_value(new_value, transform_magnitude)
   (...)
    686     transform_magnitude is the function to transform magnitude data.
    687     """
    688     _defaultcolors = ['m', 'b', 'g', 'r', 'y', 'c', 'o', 'w']

AttributeError: module 'pyqtgraph' has no attribute 'GraphicsWindow'

I'll try 3.8 next...

gsteele13 commented 1 year ago

OK, rolling back to 3.8 in a new env also gave me the same error about GraphicsWindow 😢

Must be a specific problem with the version of QT....will do some googling...

gsteele13 commented 1 year ago

OK, downgrading to pyqtgraph=0.12 solved the issue for me.

And I needed numpy=1.19 since complex is now gone and replaced with complex128...

So in the end, the environment recipe that worked for me is:

conda install python=3.9 numpy=1.19 pyqtgraph=0.12
conda install numpy scipy paramiko pandas nose pip pyqt qtpy pyyaml
conda install ipywidgets
conda install notebook
pip install pyrpl quamash
hkosovacgodart commented 8 months ago

Hi there, Could you share the versions of the rest of the packages that you used in the environment to make it work? I used the versions you suggested however still have a ZeroDivisionError that I cannot seem to get rid of... Thanks in advance!

gsteele13 commented 8 months ago

Sure, no problem. It was a while ago, but I think (?) this was the env that worked (I have 8 copies of environment attempts...)

pyrpl_env7.txt

gsteele13 commented 8 months ago

probably there are some more libraries you need to force. do you have the full traceback of the error? If so, probably you can solve it by rebuilding a new env pinning that library to the version in my list

(i've never had any success in trying to create a new env from a conda env list output myself....)

hkosovacgodart commented 8 months ago

Thank you very much for the env copy, I indeed had to add/remove a few libraries but it definitely gave me a solid base and I managed to open pyrpl (finally!). Thank you for your help!

jsm8989 commented 4 months ago

For anyone still wanting to use pyrpl with python 3.10, for example if like me you want to use pyrpl with recent versions of artiq, note the ongoing effort in the py3.10_test branch.

Steps that worked for me (in a conda 24.5.0 environment with artiq 7.8190.db.79100, which ships with python 3.10.14, Windows10):

Then I was able to install the repository version of pyrpl via pip, for example pip install C:\Users\<user>\Downloads\pyrpl-py3.10_test\pyrpl-py3.10_test\.

The first step downgraded my PyQt5 to 5.12.something and my python to 3.10.8. So far I had no problems but would be interested to hear if this does for some, especially with any gui functions in artiq.

I have opened a PR so that the second and third steps would be done automatically.