LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2024, 11:09 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Python problem on ~Current


I'm on current of version 2024-03-30, and I noticed a considerable bump in the Python3 version.
Code:
dec@Ebony:~$ python --version
Python 3.11.8
That's a good number, as iirc it claims a significant speed boost, but protonvpn pukes thusly:
Code:
root@Ebony:~# protonvpn -c --cc UK
Traceback (most recent call last):
  File "/usr/lib64/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli==2.2.12', 'console_scripts', 'protonvpn')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/protonvpn", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for protonvpn-cli
root@Ebony:~#
Protonvpn (the cli version on github) was working on current of 2024-03-22 (python3.9.19). Any thoughts?
 
Old 04-04-2024, 11:52 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
probably protonvpn needs python 3.9 or some packages have been renamed in 3.11. I would try to get official support. Try to reinstall.
 
1 members found this post helpful.
Old 04-04-2024, 12:28 PM   #3
kgha
Senior Member
 
Registered: May 2018
Location: Sweden
Distribution: Slackware 64 -current multilib from AlienBob's LiveSlak MATE
Posts: 1,081

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
Might be worth trying (re-)building proper t*z SBo packages of protonvpn-cli (and dependencies) and see if that solves your problem
 
Old 04-04-2024, 01:03 PM   #4
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,344

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
No package metadata was found
 
Old 04-04-2024, 01:05 PM   #5
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 325

Rep: Reputation: 216Reputation: 216Reputation: 216
Quote:
Originally Posted by business_kid View Post
Protonvpn (the cli version on github) was working on current of 2024-03-22 (python3.9.19). Any thoughts?
If you are using current you really need to stay abreast of changes in the changelog. There's also been a couple topics on LQ about the upgrade to python3.11. Everything that was built for 3.9 needs to be rebuilt for 3.11.
 
3 members found this post helpful.
Old 04-05-2024, 01:01 AM   #6
kgha
Senior Member
 
Registered: May 2018
Location: Sweden
Distribution: Slackware 64 -current multilib from AlienBob's LiveSlak MATE
Posts: 1,081

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
python-importlib_metadata was added to -current 2022-04-30. Do you have it installed? And upgraded to latest version (rebuilt 2024-03-29)?
 
Old 04-05-2024, 03:11 AM   #7
DryFalls
Member
 
Registered: Apr 2021
Posts: 44

Rep: Reputation: Disabled
Also note that Proton changed the way its API is accessed in the last 3 or 4 weeks. While the protonvpn-cli (as well as -gui) build and install fine from slackbuild as well as pip3, it is nonfunctional in slackware. There have been complaints from other non-systemd distros as well. Proton supports redhat, canonical, debian and arch.

If you have a proton vpn account, it can be engaged under Networkmanager without much fuss or bother or any 3rd party software.
 
Old 04-05-2024, 09:04 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Thanks for the forest or replies.

@Dry_Falls: IIRC, while shoehorning in the protonvpn package for Networkmanager without systemd is possible, it looked like a bit of work. So after trying that, the cli beckoned as the easy answer. The guy who maintains the protonvpn-cli is actually a protonvpn dev. Now it isn't. But I don't need the VPN ATM, I just like it.

@kgha: I rebuilt the SBo of the protonvpn-cli. As for the python module - If this helps
Code:
dec@Ebony:~$ ls -lh /var/log/packages/python-importlib_metadata*
-rw-r--r-- 1 root root 4.6K Mar 30 19:40 /var/log/packages/python-importlib_metadata-7.1.0-x86_64-2
@pan64: As for "official support" I have had issue #369 open on the github page but it doesn't seem to have got a glance. I did rebuild the SBo, because pip installed version 2.2.11, and the SBo was for 2.2.12.

@fourtysixandtwo: I take your point about changes & changelogs, but I have no intention of staying on the bleeding edge. I installed 2024-03-22, to clean out / & /home, and stick in Mate. I updated a week later because of some issues. But that's it for a while.
 
Old 04-05-2024, 10:41 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Dropping back to python3.9 doesn't solve it either
Code:
root@Ebony:~# protonvpn connect --cc ie
Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli==2.2.12', 'console_scripts', 'protonvpn')())
  File "/usr/bin/protonvpn", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib64/python3.9/importlib/metadata.py", line 533, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib64/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: protonvpn-cli
root@Ebony:~# python3 --version
Python 3.9.10
root@Ebony:~#
I even tried reinstalling the protonvpn-cli package under python3.9, but the error was the same.
 
Old 04-05-2024, 10:59 AM   #10
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 594

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Dropping back to python3.9 doesn't solve it either [CODE]root@Ebony:~# protonvpn connect --cc ie
.py", line 187, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: protonvpn-cli
That's because the Slackware-current package containing python3-metadata was built for Python 3.11.
Just revert to Python 3.11 and recompile protonvpn-cli plus the dependencies which are mentioned on its SBo page.
 
Old 04-05-2024, 11:29 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
OK. will do. It was just a shot in the dark. It's unusual that things compiled on one version python don't work on another. Where does the stuff installed with pip3 stand? Or do I have to do manual compiles and stop using pip?
 
Old 04-05-2024, 11:49 AM   #12
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 594

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
It's unusual that things compiled on one version python don't work on another.
That assumption is not entirely correct. Python stores its files in a versioned directory, on 64bit Slackware that would be /usr/lib64/pythonx.y/ where "x.y" has been "2.7", "3.9" and "3.11" respectively in recent times.
Meaning, if you upgrade to another minor version (e.g. from 3.9.6 to 3.9.19) things will probably not break. But if you upgrade from 3.9 to 3.11 lots of stuff stops working.
 
1 members found this post helpful.
Old 04-05-2024, 12:15 PM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by business_kid View Post
OK. will do. It was just a shot in the dark. It's unusual that things compiled on one version python don't work on another.
No, it is not true. Python developers made a lot of incompatible changes, therefore move from 3.x to 3.y usually brings on some additional "adjustments".
 
1 members found this post helpful.
Old 04-05-2024, 12:45 PM   #14
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
Yes, python .x changes can break everything. The whole python tree needs rebuilt. Sometimes all of the python modules. That's where a binary rolling release with a package manager comes in real handy.

Either use PIP or your distros package manger to keep python up to date. Not both.

Edit:
https://importlib-metadata.readthedocs.io/en/latest/

Last edited by teckk; 04-05-2024 at 12:48 PM.
 
Old 04-05-2024, 02:42 PM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
OK. python3-11.9 reinstalled & python-importlib_metadata reinstalled and showing in the python3.11 site-packages. The requirements (docopt & pythondialog) are also in python3.11/site-packages.

The command 'protonvpn connect --cc IE' trundles through but throws errors at every stage. I'm somehow connected, but the errors overflowed the 64k or whatever an xfce-terminal has. Nearly anything else seems to crap out, except the disconnect, which throws a hissy fit and then disconnects . I can get away with those two commands.

http://whatismyip.com is reporting 146.70.181.39 which is a UK exit IP for Protonvpn, and is nothing like my IP. .

This certainly isn't solved, because it certainly isn't. Let's hope updates come. But it works, so I'll stop fixing it here.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] current: python-requests-2.22.0 conflict with python-idna-2.9 marrowsuck Slackware 2 02-20-2020 06:20 AM
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
python: can you update the current shell from python? BrianK Programming 4 01-31-2008 12:18 AM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration