bk1285 / rpi_wordclock

Software to create a Raspberry Pi based wordclock
GNU General Public License v3.0
214 stars 106 forks source link

flask-restplus requires pyrsistent, which requires Python '>=3.5' #167

Closed mh0815 closed 2 years ago

mh0815 commented 3 years ago

Hi, I have solved most dependency problems myself / with the help of the issues discussions here. But I don't know how to solve this one: When I install flask-restplus, it has a dependency to pyrsistent (>=0.14.0). So it downloads latest version (0.17.2), which is not running on python 2.7. So I installed pyrsistent 0.16.0, which would satisfy the requirement and run on python 2.7. But when I install flask-restplus using sudo pip install 'flask-restplus==0.12.1' it ignores the latest version and still downloads the latest version - which fails due to python 2.7. Is there a way I can modify the flask-restplus requirements to pyrsistent>=0.14.0 <=0.16.0 ?

The workaround from @schweizschweiz mentioned in issue #160 (uncommenting web api use in wordclock.py) works to start without errors, but actually I think the web interface is one of the coolest features in this wordclock - to get rid of the buttons.

FrankX0 commented 3 years ago

Would it help to have the clock run on Python 3? I'm currently in the process of doing that. Most of the plugins compile (not physically tested though), including the web interface.

Sofradex commented 3 years ago
  1. clean install stretch
  2. first install pyrsistent (0.14.7)
  3. than all of the rest. worked for me.
InnerChimp commented 3 years ago

Unfortunately I seem to have the exact same problem. I did try the suggestion @Sofradex gave us with the clean install, but when trying to install flask-restplus, it always ends with the following:

Collecting pyrsistent>=0.14.0 (from jsonschema->flask-restplus) Downloading https://files.pythonhosted.org/packages/7d/ae/90ddcf28fb8eee5d4990920586d2856342e42faa95f39223f0b9762ef264/pyrsistent-0.17.2.tar.gz (106kB) 100% |████████████████████████████████| 112kB 2.0MB/s pyrsistent requires Python '>=3.5' but the running Python is 2.7.13

I tried a clean install of Stretch 2 times and installed Pyrsistent before te rest, but with nu luck.

Any way to keep flask-restplus from trying to install a newer Pyrsistent version?


edit: After checking this post, I decided to give it a final try. Again completely fresh installed the SD and installed everything. The suggested "pyrsistent==0.14.7" threw a new error, so I tried different versions in the 14.x range and 0.14.11 finally did the trick! It is a miracle !!! After that I was able to install the suggested 'flask-restplus==0.12.1'.

I hope this helps someone encountering the same issue. I think I did the whole SD installation already 6 times.

phenze commented 3 years ago

Try updating to pyhton3 and use a actual raspberry os.

Further information how to do that you can find here:

https://github.com/bk1285/rpi_wordclock/pull/175

InnerChimp commented 3 years ago

Try updating to pyhton3 and use a actual raspberry os.

Further information how to do that you can find here:

175

Thank you for your reply @phenze, but actually that's how I initially started. I installed the latest Raspberry OS and Python3, but I ran into issues when I followed the software setup guide. If I remember correctly, I had issues with a lot of packages, including netifaces. After reading comments like "wordclock doesn't run on python 3, you need python 2.7" I re-installed everything using the latest Raspbian Stretch and Python 2.7.

But do I understand from your post @phenze that I can actually use Raspberry OS with Python 3? How can I install all the required packages for this version?

phenze commented 3 years ago

Yes i am using latest raspberry os with python3.

Take a look here: https://github.com/phenze/rpi_wordclock/tree/master-python3

There is a Python3 Section with install instructions in the readme file

InnerChimp commented 3 years ago

Thank you very much. I will definitely try this!

HeerNMeester commented 3 years ago

@InnerChimp , Definitely do that! I reinstalled my clock last wednesday and after 3 hours of trouble with the P2.7 version I switched to @phenze's version on P3 and got it running at the first try.

InnerChimp commented 2 years ago

Yes i am using latest raspberry os with python3.

Take a look here: https://github.com/phenze/rpi_wordclock/tree/master-python3

There is a Python3 Section with install instructions in the readme file

Thanks again @phenze and sorry for not coming back earlier, but I guess life happened. Resulting in all the elements laying around, waiting for me to finish the project. So I started earlier this weekend and hooked everything up, but unfortunately it doesn't seem to run. I followed the Python3 section and it seemed to install fine.

When trying to run it, command line gives me the following:

pi@raspberrypi:~/rpi_wordclock $ sudo python3 wordclock.py Parsing /home/pi/rpi_wordclock/wordclock_config/wordclock_config.cfg Interface type set to gpio_low Wiring configuration WCA_WIDTH: 11 WCA_HEIGHT: 10 Num of LEDs: 114 Wiring layout: bernds_wiring WARNING: Default brightness value not set in config-file: To do so, add a "brightness" between 1..255 to the [wordclock_display]-section. Setting language to english_specials. Imported plugin 0: "tetris". Imported plugin 1: "leds_off". Imported plugin 2: "restart". INFO: No activate-flag set for plugin pycache within the config-file. Will be imported. No active exception to reraise Failed to import plugin pycache! Imported plugin 3: "sunrise". Imported plugin 4: "test_strip". Not found brigtness sensor value Using brigtness sensor : False Selected "time_default" as default plugin Imported plugin 5: "time_default". Imported plugin 6: "rainbow". Imported plugin 7: "time_matrix". Imported plugin 8: "matrix". Imported plugin 9: "shutdown". Imported plugin 10: "time_as_words_dutch". No module named 'pywapi' Failed to import plugin weather_forecast! Imported plugin 11: "ip_address". Skipping plugin time_as_words_german since it is set to activate=false in the config-file. INFO: No activate-flag set for plugin snake within the config-file. Will be imported. Imported plugin 12: "snake". INFO: No activate-flag set for plugin time_in_seconds within the config-file. Will be imported. Imported plugin 13: "time_in_seconds". Imported plugin 14: "feed_parser". Running plugin time_default.

bk1285 commented 2 years ago

fixed on latest develop. Reopen, if issue persists.