嗨,我最近安装的一些arch更新损坏了我电脑上的一些东西。
我再也不能让咖啡因上班了。我得到错误ValueError:命名空间GdkPixbuf不可用
我确实尝试过通过pacman安装gdk-pixbuf2,但这并没有解决问题。
我目前正在运行arch 1.4
(base) [user@user ~]$ caffeine
Traceback (most recent call last):
File "/home/user/miniconda3/bin/caffeine", line 33, in <module>
sys.exit(load_entry_point('caffeine-ng==3.4.2', 'gui_scripts', 'caffeine')())
File "/home/user/miniconda3/bin/caffeine", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/user/miniconda3/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/home/user/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/user/.local/lib/python3.8/site-packages/caffeine/main.py", line 42, in <module>
gi.require_version("GdkPixbuf", "2.0") # noqa
File "/home/user/miniconda3/lib/python3.8/site-packages/gi/__init__.py", line 126, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GdkPixbuf not available
事实证明,这是一个与miniconda干扰arch python(或类似的东西??(有关的问题
不管怎样,做了以下事情并使一切正常工作:
谢谢!我编辑了我的.bashrc文件:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
#[[ $- != *i* ]] && return
#alias ls='ls --color=auto'
#PS1='[u@h W]$ '
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/user/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
#if [ $? -eq 0 ]; then
#eval "$__conda_setup"
#else
if [ -f "/home/user/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/user/miniconda3/etc/profile.d/conda.sh"
#else
#export PATH=""$PATH:/home/user/miniconda3/bin"
# fi
fi
#unset __conda_setup
# <<< conda initialize <<<
在/etc/profile中,我评论道:
#export PATH="$PATH:/usr/local/miniconda/bin"
运行类型-python给我的:
[user@user ~]$ type -a python
python is /usr/bin/python
python is /bin/python
我重新安装了咖啡因ng,一切都很好。