颜林林的个人网站

Linlin Yan's Personal Website

解决python-exec的报错信息

2021-01-22 04:21

问题

最近我的Gentoo Linux系统升级后,经常会出现如下报错:

python-exec: Invalid impl in /etc/python-exec/python-exec.conf: python3.6

究其原因,是因为python升级了新版本(3.83.9),而删除了旧版(3.6),但因为配置的版本选择器并没有相应更新,所以有此信息提示。

解决方法

解决方法如下(即使用eselect python clean):

1
2
3
4
5
6
# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.9
  [2]   python3.7 (uninstalled)
  [3]   python3.6 (uninstalled)
  [4]   python3.8 (fallback)
1
# eselect python cleanup
1
2
# eselect python update
Switching to python3.9
1
2
3
4
# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.9
  [2]   python3.8 (fallback)

其他

若本地没有安装eselect-python,则可能在上述修复过程中,会出现如下提示:

# eselect python
!!! Error: Can't load module python
exiting

可以通过如下命令,安装相应软件包,进行解决:

1
emerge -av eselect-python

参考