编辑#3:
经过一系列尝试删除软件包并使用/不使用 virtualenv 再次安装后,我遇到了各种障碍,这需要我做(在参考,参考)
$ conda install -c conda-forge pygobject
$ conda install -c conda-forge gtk3
在某一时刻,通过某种操作和配置的组合(我现在无法重现),我似乎已克服报告的错误,但我无法连接到 VPN。经过进一步的尝试,我又回到了原来的位置。
编辑#2:
$ sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0
[sudo] password for user1:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-gi is already the newest version (3.36.0-1).
python3-gi-cairo is already the newest version (3.36.0-1).
gir1.2-gtk-3.0 is already the newest version (3.24.20-0ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
编辑:
我遵循了 GADER 的回答。现在我明白了
$ protonvpn-gui
Traceback (most recent call last):
File "/home/user1/anaconda3/bin/protonvpn-gui", line 5, in <module>
from linux_gui.protonvpn_gui import init
File "/home/user1/anaconda3/lib/python3.9/site-packages/linux_gui/protonvpn_gui.py", line 9, in <module>
import gi
ModuleNotFoundError: No module named 'gi'
显然,使用的 python 来自 anaconda (我希望更新不会破坏任何东西)。
我仍然需要调试新的错误。
初始操作数
我安装protonvpn-stable-release_1.0.1-1_all.deb
在Bodhi Linux,内核5.13.0-39-generic #44~20.04.1-Ubuntu SMP中,
$ sudo gdebi protonvpn-stable-release_1.0.1-1_all.deb
请注意,这是在 anaconda 的 virtualenv 下完成的(base)
,这可能会引起麻烦。
当我尝试运行protonvpn
(或protonvpn-cli
或protonvpn-gui
)时,我得到
$ protonvpn
Traceback (most recent call last):
File "/usr/bin/protonvpn", line 11, in <module>
load_entry_point('protonvpn-gui==1.7.0', 'console_scripts', 'protonvpn')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/protonvpn_gui/main.py", line 16, in <module>
from protonvpn_nm_lib.api import protonvpn
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/api.py", line 6, in <module>
from .core.report import BugReport
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/report/__init__.py", line 1, in <module>
from .bug import BugReport
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/report/bug.py", line 7, in <module>
from ..subprocess_wrapper import subprocess
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/subprocess_wrapper.py", line 123, in <module>
subprocess = SubprocessWrapper() # noqa
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/subprocess_wrapper.py", line 34, in __init__
self.__ensure_executables_exist()
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/subprocess_wrapper.py", line 81, in __ensure_executables_exist
raise RuntimeError(
RuntimeError: Couldn't find acceptable executables for {'xdg-open'}
(base) [user1@Orion:/mnt/shared_data/Downloads]$
但我确实有一个合适的xdg-open
$ type xdg-open
xdg-open is /usr/bin/xdg-open
除非问题出在版本上。
我该如何解决这个问题?
我看到其他报道RuntimeError: Couldn't find acceptable executables for ...
(来源,来源)。
答案1
通过以下方式安装pip3
:
sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0
python3 -m pip install --upgrade pip
python3 -m pip install protonvpn-gui
protonvpn-gui