Getting error when trying to install

I got wrapped up in the update issue and tried fixing it myself by deleting wfpiconsole and doing a fresh install. The install failed with:

Updated build/lib.linux-armv7l-cpython-37/kivy/include/config.h
      Updated /tmp/pip-req-build-5f9rftq_/kivy/include/config.h
      Updated build/lib.linux-armv7l-cpython-37/kivy/include/config.pxi
      Updated /tmp/pip-req-build-5f9rftq_/kivy/include/config.pxi
      Updated build/lib.linux-armv7l-cpython-37/kivy/setupconfig.py
      Updated /tmp/pip-req-build-5f9rftq_/kivy/setupconfig.py
      Detected compiler is unix
       /tmp/pip-req-build-5f9rftq_/setup.py:370: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
         cy_ver = LooseVersion(cy_version_str)
       /tmp/pip-req-build-5f9rftq_/setup.py:373: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
         if cy_ver < LooseVersion(MIN_CYTHON_STRING):
       /tmp/pip-req-build-5f9rftq_/setup.py:377: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
         elif cy_ver > LooseVersion(MAX_CYTHON_STRING):
       warning: kivy/graphics/common.pxi:9:4: 'const_char_ptr' redeclared
       warning: kivy/graphics/common.pxi:23:4: 'size_t' redeclared
       warning: kivy/core/window/_window_sdl2.pyx:430:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
       error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for Kivy
Failed to build Kivy
ERROR: Could not build wheels for Kivy, which is required to install pyproject.toml-based projects

I am having the same issue trying to update.

Well… I managed to fix it, but not the way I wanted to. I installed it with “sudo”…but I’m kinda hoping to not have to do that. I’d rather it just run as my local user.

Any ideas?

@mabeatty1978 and @chrisn997, can you let me know which Raspberry Pi and OS combination you are using? You shouldn’t have to use sudo and I’m fairly confident the installer should work on all supported hardware/OS combinations

Pi 3 Model B, version 10 (buster).

I did install it before fine without problem, not sure what has happened since

If you managed to install it before, I would suggest starting with a fresh image of Raspberry Pi OS (Buster) on your SD card and trying the install again. Hopefully that’ll fix what ever issue is now preventing it from installing

@peter I’m using a 4B with Buster. I want to do a clean install of Bullseye but I’ve got other software that I’ll need to reload and it’ll take me a bit to remember what I’ve got and get it all reloaded. In the meantime, is there a way to fall back to the previous version, which was working fine?

Did you run wfpiconsole update and how far did it get? Have you tried just running wfpiconsole start? If the update didn’t finish, then you may still be on the old version

Yes, simply starting it does work .

It seems like the issue with the install is with cryptography, I’ve put a copy of the install log here. I don’t recall ever needing to compile that module previously and don’t have a Rust compiler install. If that’s the only way to get this to work I can certainly do that, but I wanted to check with you first.

@peter Two PI 3B+ and buster. Same failed install on both. Error messages advised to install "pip install --upgrade pip and too install Rust. Did both those things and the updage completed successfully. However when I do wfpiconsole start I get the following
pi@WeatherFlowPi:~ $ wfpiconsole start
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_23-03-05_19.txt
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at “/home/pi/.local/lib/python3.7/site-packages/kivy/init.py”
[INFO ] [Python ] v3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0]
[INFO ] [Python ] Interpreter at “/usr/bin/python3”
[INFO ] [Logger ] Purge log fired. Processing…
[INFO ] [Logger ] Purge finished!

===================================================
New version detected
Starting wfpiconsole configuration wizard

Required fields are marked with an asterix (*)

API keys

Traceback (most recent call last):
File “main.py”, line 35, in
configFile.update()
File “/home/pi/wfpiconsole/lib/config.py”, line 155, in update
copyConfigKey(newConfig, currentConfig, Section, Key, defaultConfig()[Section][Key])
File “/home/pi/wfpiconsole/lib/config.py”, line 270, in copyConfigKey
validateAPIKeys(newConfig)
File “/home/pi/wfpiconsole/lib/config.py”, line 531, in validateAPIKeys
CHECKWX = requests.get(URL, headers=header).json()
File “/usr/lib/python3/dist-packages/requests/api.py”, line 75, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3/dist-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/lib/python3/dist-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 343, in _make_request
self._validate_conn(conn)
File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 841, in validate_conn
conn.connect()
File “/usr/lib/python3/dist-packages/urllib3/connection.py”, line 332, in connect
cert_reqs=resolve_cert_reqs(self.cert_reqs),
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 264, in create_urllib3_context
context = SSLContext(ssl_version or ssl.PROTOCOL_SSLv23)
File “/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py”, line 391, in init
self._ctx = OpenSSL.SSL.Context(self.protocol)
File “/home/pi/.local/lib/python3.7/site-packages/OpenSSL/SSL.py”, line 674, in init
res = _lib.SSL_CTX_set_ecdh_auto(context, 1)
AttributeError: module ‘lib’ has no attribute ‘SSL_CTX_set_ecdh_auto’

Just for grins, try this if you have time.

Save your .local and wfpiconsole and .kivy and .cache trees aside for safekeeping, then try a full install again. Does it install and work ?

The reason I ask is that your python version of 3.7.3 looks old. A current one would be 3.9.2

Can you share the output of

cat /etc/os-release

and

cat /proc/device-tree/model

Thanks!

pi@WeatherFlowPi:~ $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“RaspbianForums - Raspbian
BUG_REPORT_URL=“RaspbianBugs - Raspbian
cat /proc/device-tree/model
Raspberry Pi 4 Model B Rev 1.1pi@WeatherFlowPi:~ $

This is your issue: you are running the Buster version of Raspberry Pi OS on a Pi4. You need to upgrade to the Bullseye version and that will fix all the issues with the console

I’m having trouble updating to 23.3.1. I get an error (see screen shot).

Other details of my system:
Raspberry Pi 4 Model B Rev 1.2pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“RaspbianForums - Raspbian
BUG_REPORT_URL=“RaspbianBugs - Raspbian

Thanks in advance.

Try “sudo apt install rustc” to install the Rust compiler

I ran into this in the past. pip wants to install the crypto library but it needs the rust compiler to do so.

Either do as Vince says, or preferably see the post right above yours:

Thanks for your input. I ended up taking out the SD card and flashing the new OS (Bullseye) and starting over.
The only thing I lost was the ability to make the screen go dark (or asleep) between midnight and 7AM. It was a Raspberry Pi command line code, but I don’t know what it was.

1 Like

Thanks @Peter reflashed with latest OS and all good. On a positive note got more “when are you going to get this working again” from Wife than any other piece of technology in the house of which there is lots. A testament to the nice integration and usefulness of wfpiconsole.
Regards,
Bill Eaton

3 Likes

Thanks @vinceskahan - did give this a try but in the end decided probably best to just reflash with latest version of pi os and reinstall which did resolve problem.
Regards,