error: can't find Rust compiler

126 views
Skip to first unread message

Lucas Heijst

unread,
May 29, 2023, 10:25:20 AM5/29/23
to weewx-development
Fresh install of debian bullseye light on RPI 3B
Tried to install weewx as follows::
----
#Trust weewx.com
wget -qO - https://weewx.com/keys.html | \
  sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpg
wget -qO - https://weewx.com/apt/weewx-python3.list | \
  sudo tee /etc/apt/sources.list.d/weewx.list

#Install weewx using PIP
sudo apt update
sudo apt -y install gcc python3-dev python3-pip
pip3 install wheel
pip3 install weewx --user
----

The weewx installation stops with error "can't find Rust compiler", see attachment
error-cant find Rust compiler.txt

Greg Troxel

unread,
May 29, 2023, 10:37:07 AM5/29/23
to Lucas Heijst, weewx-development
Lucas Heijst <ljm.h...@gmail.com> writes:

> The weewx installation stops with error "can't find Rust compiler", see
> attachment

I am far from an expert, but your choices are basically:

install the rust compiler, or

find all the projects that decided it was ok to depend on rust, file
bugs that they shouldn't, and hold your breath until they see the
light and stop

install pre-built wheels or something like that

Tom Keffer

unread,
May 29, 2023, 10:39:38 AM5/29/23
to Lucas Heijst, weewx-development
Funny. I was just writing up a note about this problem (among others).

See the wiki entry Pip troubleshooting.

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/25fde959-d149-439f-89a8-6cd5617ed06fn%40googlegroups.com.

Lucas Heijst

unread,
May 29, 2023, 11:20:26 AM5/29/23
to weewx-development
Tom, I followed the steps in Pip troubleshooting

I tried the steps below and got errors with the following steps:
1. python3 -m pip install weewx --user
2. python3 -m pip install pymysql[rsa]
----

sudo apt update

sudo apt upgrade

sudo apt -y install gcc python3-dev python3-pip

python3 -m pip install wheel

python3 -m pip install weewx --user


If errors, try this:

python3 -m pip install weewx --no-deps

python3 -m pip install configobj

python3 -m pip install pyserial

python3 -m pip install pyusb

python3 -m pip install CT3

python3 -m pip install ephem

python3 -m pip install Pillow

python3 -m pip install pymysql[rsa]

----

Op maandag 29 mei 2023 om 11:39:38 UTC-3 schreef Tom Keffer:
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly.txt

Tom Keffer

unread,
May 29, 2023, 11:40:14 AM5/29/23
to Lucas Heijst, weewx-development
I'm really surprised that cryptography is not available for your buster light. What happens if you just do

python3 -m pip install cryptography --user

If that doesn't work, I see 3 choices:
  1. Use a database other than MySQL.
  2. Use something other than rsa authentication.
  3. Install the Rust compiler, then try to compile and install cryptography from scratch.
-tk

Lucas Heijst

unread,
May 29, 2023, 1:34:36 PM5/29/23
to weewx-development
I started all over, with the 64-bit version of Raspberri PI OS Light (64-bit)  and this time all went OK

1. Fresh install of Raspberri PI OS Light (64-bit)

2. Fresh install of weewx:

sudo apt update
sudo apt upgrade
sudo apt -y install gcc python3-dev python3-pip
pip3 install wheel
pip3 install weewx --user

Op maandag 29 mei 2023 om 12:40:14 UTC-3 schreef Tom Keffer:

Joel Bion

unread,
May 29, 2023, 1:58:48 PM5/29/23
to Lucas Heijst, weewx-development
Should a 64 bit O/S be a WeeWX prerequisite?

Sent from my iPhone

On May 29, 2023, at 10:34 AM, Lucas Heijst <ljm.h...@gmail.com> wrote:

I started all over, with the 64-bit version of Raspberri PI OS Light (64-bit)  and this time all went OK

Vince Skahan

unread,
May 29, 2023, 2:09:34 PM5/29/23
to weewx-development
Luc - this worked for me on a 4GB pi4.  You'll see I added the ssl library as well as the rust compiler.

I added the --verbose flag to watch cryptography build since it takes a 'long' time (16 minutes) to build even on a pi4.

    # needed for weewx
    sudo apt-get install -y gcc
    sudo apt-get install -y python3-dev
    python3 -m pip install wheel --user

    # needed for cryptography
    sudo apt-get install -y rustc
    sudo apt-get install -y libssl-dev
    
    # this takes many minutes to complete
    pip3 install --user cryptography --verbose

    # finally - install weewx

    python3 -m pip install weewx --user

I might add that you don't need to do the 'trust the weewx repo' steps from your original post for pip installations.

Vince Skahan

unread,
May 29, 2023, 2:12:03 PM5/29/23
to weewx-development
On Monday, May 29, 2023 at 10:58:48 AM UTC-7 Joel Bion wrote:
Should a 64 bit O/S be a WeeWX prerequisite?


No.  The only prerequisite should continue to be compatible python things.
 

Greg Troxel

unread,
May 29, 2023, 2:35:05 PM5/29/23
to Vince Skahan, weewx-development
Indeed, but with rust, you end up with an implicit requirement that you
cross build, run Other People's binaries, or have a lot of RAM and
patience. 1 GB is not really enough to self-host rust (building the
compiler from source with a bootstrap and then building things).

But I don't think core weewx depends on anything that needs rust to
build. Certainly extensions might.

Lucas Heijst

unread,
May 29, 2023, 3:28:57 PM5/29/23
to weewx-development
Tom, Vince and Greg,

For users with a limited knowledge of Linux the installation of weewx should be a few (simple) installation steps as it always was before.

Op maandag 29 mei 2023 om 15:35:05 UTC-3 schreef Greg Troxel:

Tom Keffer

unread,
May 29, 2023, 4:06:14 PM5/29/23
to Lucas Heijst, weewx-development
For users with a limited knowledge of Linux the installation of weewx should be a few (simple) installation steps as it always was before.

I agree. I'm surprised you had such trouble installing WeeWX with Pip. I guess they leave a lot out of the "light" version of bullseye. What's the exact version of the OS that you tried to use?

Greg Troxel

unread,
May 29, 2023, 4:11:15 PM5/29/23
to Lucas Heijst, weewx-development
Lucas Heijst <ljm.h...@gmail.com> writes:

> Tom, Vince and Greg,
>
> For users with a limited knowledge of Linux the installation of weewx
> should be a few (simple) installation steps as it always was before.

Yes, but you are blurring:

Things weewx depends on decide to use languages that are not
compatible with the amount of RAM that weewx could fit in.

"Simple steps" presupposes binary packages for some set of operating
systems, operating system versions, and CPU types. There are a vast
number of these. Almost always most of them do not have binaries. I
ask you to stand in solidarity with me as I request pre-built binaries
for NetBSD 10 vax! But seiously, the world is much more than a few
distributions of GNU/Linux on about 4 CPU types.

and not addressing:

It is generally the responsibility of projects to provide source code,
and packaging systems (which GNU/Linux "distributions are) to provide
binaries for users.


For the latter point, Tom may take a more expansive view. In a project
I maintain*, I do not, and users not finding binaries that work for
their is not allowed in the bug tracker because it is not a bug in the
source code.

* not named to avoid derailing this

Lucas Heijst

unread,
May 29, 2023, 4:15:23 PM5/29/23
to weewx-development
Tom,

I installed at first Raspberri PI OS Light (32-bit) which resulted in errors
cat /etc/debian_version
11.7
Later I installed Raspberri PI OS Light (64-bit) which was OK
Same debian version 11.7
Op maandag 29 mei 2023 om 17:11:15 UTC-3 schreef Greg Troxel:

Vince Skahan

unread,
May 29, 2023, 4:20:18 PM5/29/23
to weewx-development
Luc - yes.  It is still a few limited steps. About a half dozen if you use pip on a pi using 32-bit RaspiOS.  Fewer if you use a pre-packaged weewx or a different os.

The underlying problem you ran into is the underlying pi 32-bit os not having a usually available python library.  Not weewx's fault.

Example - it takes 'two' steps to install using debian/bullseye64 in Vagrant:
    sudo apt-get install -y gcc python3-pip
    python3 -m pip install weewx --user
And then you do the normal configuration.

Tom - I did my stuff using 2022-09-22-raspios-bullseye-armhf-lite.img updated to current patchlevels before installing weewx.    I see there are newer 2023-05-03-raspios-bullseye-armhf-lite.img.xz and 2023-05-03-raspios-bullseye-arm64-lite.img.xz available but I didn't try those.

Luc - cat /boot/issue.txt to see which image you started with.  That seems to persist across updates FWIW.

Vince Skahan

unread,
May 29, 2023, 4:28:12 PM5/29/23
to weewx-development
Just one more comment on this one.   Another example - rockylinux/9 in vagrant...

sudo yum install -y python3-devel gcc python3-pip
pip3 install --user wheel
pip3 install --user weewx
weectl station create --no-prompt
chcon -R --reference /bin/ls ~/.local/bin
cd ~/weewx-data
sudo cp util/systemd/weewx.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable weewx
sudo systemctl start weewx

Tom Keffer

unread,
May 29, 2023, 4:30:20 PM5/29/23
to Lucas Heijst, weewx-development
I installed at first Raspberri PI OS Light (32-bit) which resulted in errors

Thanks for the info.

I had similar problems when I tried to install on a 32-bit version of Debian 9. I gave up trying to install pymysql because I didn't need it.

I don't think a user can expect a prebuilt wheel for a 32-bit operating system --- they're pretty rare nowadays.

-tk

Lucas Heijst

unread,
May 29, 2023, 4:54:09 PM5/29/23
to weewx-development
Vince,

FYI

cat /boot/issue.txt

pi11:
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 638c7521ee0c431fafca1e2bd4fd25705b37ea5b, stage2

Pi21:
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 638c7521ee0c431fafca1e2bd4fd25705b37ea5b, stage2


pi31:
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4

pi33
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage2

pi35:
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage2

pi36:
Ubuntu 22.10 (GNU/Linux 5.19.0-1017-raspi aarch64)

pi41:
Raspberry Pi reference 2023-02-21
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f2d385517c9631f2ded876deb1115725d0c75995, stage4

pi42:
Raspberry Pi reference 2022-09-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 8a42abcd1dbd8c9c1fdfca4e0c3778255b2f9cc4, stage2

Op maandag 29 mei 2023 om 17:30:20 UTC-3 schreef Tom Keffer:

Lucas Heijst

unread,
May 29, 2023, 5:04:13 PM5/29/23
to weewx-development
Vince,

Below the information when logged in.

Linux pi11 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT 2022 armv6l
Linux pi21 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l
Linux pi31 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64
Linux pi33 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l
Linux pi35 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64
pi36: Welcome to Ubuntu 22.10 (GNU/Linux 5.19.0-1017-raspi aarch64)
Linux pi41 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64
Linux pi42 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64

Op maandag 29 mei 2023 om 17:54:09 UTC-3 schreef Lucas Heijst:

Vince Skahan

unread,
May 29, 2023, 6:04:55 PM5/29/23
to weewx-development
On Monday, May 29, 2023 at 1:30:20 PM UTC-7 Tom Keffer wrote:
I don't think a user can expect a prebuilt wheel for a 32-bit operating system --- they're pretty rare nowadays.


FWIW, the Raspi Foundation still recommend their 32-bit variant according to their website, but the 64-bit variants are there too of course...

 

Tom Keffer

unread,
May 29, 2023, 6:08:55 PM5/29/23
to Vince Skahan, weewx-development
FWIW, the Raspi Foundation still recommend their 32-bit variant according to their website, but the 64-bit variants are there too of course...

Good to know.

It may not be the 32-bits that causes the problem, but rather the "lite" version. Does the regular version of Raspberry Pi OS include the cryptography library?

Vince Skahan

unread,
May 29, 2023, 6:46:16 PM5/29/23
to weewx-development
ok - did a quick check of the latest 64-bit desktop and 32-bit lite RaspiOS.  All that's needed for the lite os is to add the dpkg of python3-cryptography.  It's in the desktop contents but you need to add it to the lite variant.  Once you do that, installing weewx is a one-step "pip3 install --user weewx" with nothing else required.

Tom Keffer

unread,
May 29, 2023, 7:19:06 PM5/29/23
to Vince Skahan, weewx-development
Good sleuthing, Vince.

I've added this to the Pip troubleshooting wiki. https://github.com/weewx/weewx/wiki/pip-troubleshooting

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.

Lucas Heijst

unread,
May 30, 2023, 7:26:55 AM5/30/23
to weewx-development
Tom, Vince,

Installing cryptography with pip3 failed on Raspberry PI OS light (32-bit)

Steps taken:

Fresh install of Raspberry PI OS light (32-bit)
-----
Linux pi36 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l
cat /etc/debian_version
11.6
cat /boot/issue.txt
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 47eee1f0ddcf8811559d51eea1c1bb48335e3e88, stage2
-----

apt update && apt upgrade
apt install gcc python3-dev python3-pip
pip3 install cryptography --user (failed, see attachment)

Op maandag 29 mei 2023 om 20:19:06 UTC-3 schreef Tom Keffer:
install cryptography.txt

Tom Keffer

unread,
May 30, 2023, 7:40:14 AM5/30/23
to Lucas Heijst, weewx-development
You install using apt, not pip

sudo apt install python3-cryptography


Lucas Heijst

unread,
May 30, 2023, 8:22:41 AM5/30/23
to weewx-development
Thanks Tom, the installation of weewx v5 went OK on Raspberry PI OS (32-bit)

Linux pi36 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l
cat /etc/debian_version
cat /boot/issue.txt
11.6

Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 47eee1f0ddcf8811559d51eea1c1bb48335e3e88, stage2

apt update && apt upgrade

apt install gcc python3-dev python3-pip

apt install python3-cryptography

pip3 install wheel --user

pip3 install weewx --user

Op dinsdag 30 mei 2023 om 08:40:14 UTC-3 schreef Tom Keffer:
Install Raspberry PI OS light 32-bit and weewx v5 on RPI 3B.txt

Tom Keffer

unread,
May 30, 2023, 8:32:06 AM5/30/23
to Lucas Heijst, weewx-development
Good to know. Thanks, Luc

Reply all
Reply to author
Forward
0 new messages