How to Uninstall wfpiconsole?

Unfortunately the wfpiconsole python software broke my ProtonVPN package. I need to uninstall the wfpiconsole, but the readme instructions don’t tell you how.

How can I uninstall this software and the code associated with it on Linux Mint?

Using the command python3 -m pip uninstall wfpiconsole gives me the below results.

WARNING: Skipping wfpiconsole as it is not installed.

How would you reach that conclusion ?

Seeing some error messages or log files might help.

But to answer:

  • /home/pi/wfpiconsole has the actual console code - you can delete this
  • /home/pi/.kivy has some piconsole graphics logs and odds and ends - you can delete this
  • /home/pi/.local has user-installed modules, but other software might put things there too. You can’t just blindly uninstall things there without a little more analysis. I’d suggest uninstalling them one by one. You might try digging into how ProtonVPN installs things as well to see if you can figure out which version of what is conflicting. Use the logs if any exist.

On a clean pi4, here’s the python modules piconsole installed for me and how to figure that out. You would uninstall them with “pip3 uninstall”.

pi@pi4jr:~ $ pip3 list --verbose|grep local
cffi               1.15.1    /home/pi/.local/lib/python3.9/site-packages pip
cryptography       38.0.1    /home/pi/.local/lib/python3.9/site-packages pip
Cython             0.29.26   /home/pi/.local/lib/python3.9/site-packages pip
ephem              4.1.3     /home/pi/.local/lib/python3.9/site-packages pip
Kivy               2.1.0     /home/pi/.local/lib/python3.9/site-packages pip
Kivy-Garden        0.1.5     /home/pi/.local/lib/python3.9/site-packages pip
numpy              1.21.4    /home/pi/.local/lib/python3.9/site-packages pip
packaging          21.3      /home/pi/.local/lib/python3.9/site-packages pip
pip                23.1.2    /home/pi/.local/lib/python3.9/site-packages pip
pycparser          2.21      /home/pi/.local/lib/python3.9/site-packages pip
pyOpenSSL          21.0.0    /home/pi/.local/lib/python3.9/site-packages pip
pyparsing          3.1.0     /home/pi/.local/lib/python3.9/site-packages pip
setuptools         68.0.0    /home/pi/.local/lib/python3.9/site-packages pip
websockets         10.1      /home/pi/.local/lib/python3.9/site-packages pip

If you had your ProtonVPN installed for a long time and just installed piconsole and broke something, you might be able to figure out what python modules were installed from your logs or alternately look at the timestamps of the .local tree files pip installed.

You’ll see that I installed pyconsole at 14:43 yesterday and later installed a different app at 15:20 that brought in a lot of modules. I also uninstalled/reinstalled another package at 9:44 today as a test. So the piconsole stuff is the list installed from 14:43-14:45 yesterday in the list below.

pi@pi4jr:~/.local/lib/python3.9/site-packages $ ls -lgd *info|sort +5n
drwxr-xr-x 2 pi 4096 Jun 20 14:43 Cython-0.29.26.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:43 numpy-1.21.4.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:43 pip-23.1.2.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:43 setuptools-68.0.0.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:43 websockets-10.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 cffi-1.15.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 cryptography-38.0.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 ephem-4.1.3.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 packaging-21.3.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 pycparser-2.21.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 pyOpenSSL-21.0.0.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:44 pyparsing-3.1.0.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:45 Kivy-2.1.0.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 14:45 Kivy_Garden-0.1.5.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 certifi-2022.12.7.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 charset_normalizer-3.0.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 idna-3.4.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 influxdb-5.3.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 msgpack-1.0.4.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 paho_mqtt-1.6.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 python_dateutil-2.8.2.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 pytz-2022.7.1.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 requests-2.28.2.dist-info
drwxr-xr-x 2 pi 4096 Jun 20 15:20 urllib3-1.26.14.dist-info
drwxr-xr-x 2 pi 4096 Jun 21 09:44 wfudptools-5.1.0.dist-info
1 Like

Thanks for your reply. I’ll answer your question first, and then I’ll have to follow-up on the rest of your post and give another update.

I reached out to ProtonVPN support because my ProtonVPN app all of a sudden stopped working. I can try to open the app from my launcher, but nothing happens. I sent them the following:

The output from protonvpn-cli -v is shown below:

Traceback (most recent call last):
File “/usr/bin/protonvpn-cli”, line 11, in
load_entry_point(‘protonvpn-cli==3.13.0’, ‘console_scripts’, ‘protonvpn-cli’)()
File “/usr/lib/python3/dist-packages/protonvpn_cli/main.py”, line 20, in main
from .cli import ProtonVPNCLI
File “/usr/lib/python3/dist-packages/protonvpn_cli/cli.py”, line 4, in
from proton.constants import VERSION as proton_version
File “/usr/lib/python3/dist-packages/proton/init.py”, line 1, in
from .api import Session # noqa
File “/usr/lib/python3/dist-packages/proton/api.py”, line 21, in
from .cert_pinning import TLSPinningAdapter
File “/usr/lib/python3/dist-packages/proton/cert_pinning.py”, line 5, in
from OpenSSL import crypto
File “/usr/lib/python3/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/crypto.py”, line 3279, in
_lib.OpenSSL_add_all_algorithms()AttributeError: module ‘lib’ has no attribute ‘OpenSSL_add_all_algorithms’

Their response:

According to the output you are receiving: AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' it appears that you might be experiencing some Python misconfiguration probably as a result of Pip installing some packages recently.

Could you please let us know if you have recently installed any packages via the pip command? If so, please note that this is something we discourage as packages installed in this way may override official Linux distribution packages and can break other Python software that relies on them, including the Proton VPN app and CLI.

The only thing I have installed recently is wfpiconsole. I looked at GitHub to confirm it was python software. I’m not a developer or even a strong user, I just put the two together to assume the wfpiconsole caused this.

I actually formatted my disk and reinstalled Linux and ProtonVPN worked fine. I installed wfpiconsole again, and sure enough ProtonVPN is not working.

Yeah - that is possible. You have a few options.

  • try installing the apps in the reverse order. If one of them just needs package xyz and the other one installed a version of that already, perhaps both will work

  • you can almost certainly make a new piconsole user, log in as ‘that’ user, and then install the piconsole without creating conflicts. You would need to tweak the startup file a little to run as a different user I’d expect but both apps should work.

  • if you’re gutsy, see if you have a pyOpenSSL module in /home/pi/.local/lib/python3.9/site-packages ‘and’ one also in /usr/lib/python3/dist-packages as well. If so, try renaming the one under /home and see if both apps work. I’ve seen differences in how pip-installed and os-packaged modules are compiled. Rare but it happens.

Future versions of python are actually going to start whining about this very issue and debian-12 even does now. The long gory description is at PEP 668 – Marking Python base environments as “externally managed” | peps.python.org but it’s a bit of a rough read. Short description is that they don’t like that --user installed modules (like piconsole uses) can supersede system-level installed packages under some circumstances. That’s probably what you’re running into.

Making a new piconsole user and installing/running the console as that user is almost definitely going to work, but if you have time to experiment a little, it might help @peter tweak things down the road.

(this is an issue for the new weewx v5 and they’re going to switch to using python virtual environments as per the PEP in the coming release, probably…)

1 Like

Hi @tempest.swes0, sorry you have been running into issues! This is almost certainly caused by the PiConsole installing a version of pyOpenSSL that is not compatible with ProtonVPN. @vinceskahan’s solution of installing PiConsole under a second user would work well, as that should stop the --user installed module interfering with the OS installed module. As I try and support both Pi3 and Pi4 hardware, I unfortunately have to find versions of the modules that work in both cases, although this can mean running versions that are not the latest.

Let us know how you manage to solve this - there is always a chance I can do something to fix it globally

1 Like

Thank you both for the feedback.

As I’m not skilled enough to attempt the potential resolutions offered, I have just reinstalled Linux Mint to resolve my VPN issue.

I will actually be building a small rapsberypi board to run this on that should not have the same issue. I really enjoyed the app.

Thanks!

Pete - you’re probably long-term going to need to tweak things to run in a python virtualenv according to the PEP that I quoted, but I didn’t get too far hacking on your wfpiconsole.sh to make that happen since you pull from github when doing a lot of things like switching to/from beta etc.

I can’t quite follow the discussion in PEP 668 – Marking Python base environments as “externally managed” | peps.python.org well enough to know if there’s anything you can do to install with --user in such a way that it doesn’t trigger the issue that this particular user can into.

My fear is that when RaspiOS catches up to this PEP’s version of python like debian12 did, that people are going to be confused when your installer will 100% fail as-is currently.

Here’s an example of how it’ll blow up (ugh…like really ugh…)

vagrant@bookworm:~$ pip install --user wfudptools
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Adding the --break-system-packages switch ‘does’ work, FWIW, but who knows when they’ll deprecate that away. Maybe you can do some kind of python check for support for that switch, I dunno.

Here’s the os specs for the vagrant box that I used…

vagrant@bookworm:~$ pip3 -V
pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11)

vagrant@bookworm:~$ python3 -V
Python 3.11.2

vagrant@bookworm:~$ cat /etc/debian_version
12.0

vagrant@bookworm:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"