“ImportError: No module named glib” when running ScreenFetch
When opening terminal I get the follow 4 lines before ScreenFetch runs:
[[ ! ]] Traceback (most recent call last):
[[ ! ]] File "/usr/bin/unity", line 21, in <module>
[[ ! ]] import glib
[[ ! ]] ImportError: No module named glib
I assumed that all I need to do is install the 'glib' package, so I ran:
sudo apt-cache search glib
to try and find the package myself, but there's literally hundreds of results returned to me, and I'm not sure which one is the one I need. If I remove ScreenFetch from the bashrc then I don't get any errors. After the first 4 lines ScreenFetch runs fine and I can use terminal normally, it's just a little bit annoying that's all.
Any help would be very appreciated.
Edit: sorry, forgot to include the line in my bashrc file. Here it is:
# start screenfetch
screenfetch
command-line glib
add a comment |
When opening terminal I get the follow 4 lines before ScreenFetch runs:
[[ ! ]] Traceback (most recent call last):
[[ ! ]] File "/usr/bin/unity", line 21, in <module>
[[ ! ]] import glib
[[ ! ]] ImportError: No module named glib
I assumed that all I need to do is install the 'glib' package, so I ran:
sudo apt-cache search glib
to try and find the package myself, but there's literally hundreds of results returned to me, and I'm not sure which one is the one I need. If I remove ScreenFetch from the bashrc then I don't get any errors. After the first 4 lines ScreenFetch runs fine and I can use terminal normally, it's just a little bit annoying that's all.
Any help would be very appreciated.
Edit: sorry, forgot to include the line in my bashrc file. Here it is:
# start screenfetch
screenfetch
command-line glib
Edit your question and add the output ofpython -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01
add a comment |
When opening terminal I get the follow 4 lines before ScreenFetch runs:
[[ ! ]] Traceback (most recent call last):
[[ ! ]] File "/usr/bin/unity", line 21, in <module>
[[ ! ]] import glib
[[ ! ]] ImportError: No module named glib
I assumed that all I need to do is install the 'glib' package, so I ran:
sudo apt-cache search glib
to try and find the package myself, but there's literally hundreds of results returned to me, and I'm not sure which one is the one I need. If I remove ScreenFetch from the bashrc then I don't get any errors. After the first 4 lines ScreenFetch runs fine and I can use terminal normally, it's just a little bit annoying that's all.
Any help would be very appreciated.
Edit: sorry, forgot to include the line in my bashrc file. Here it is:
# start screenfetch
screenfetch
command-line glib
When opening terminal I get the follow 4 lines before ScreenFetch runs:
[[ ! ]] Traceback (most recent call last):
[[ ! ]] File "/usr/bin/unity", line 21, in <module>
[[ ! ]] import glib
[[ ! ]] ImportError: No module named glib
I assumed that all I need to do is install the 'glib' package, so I ran:
sudo apt-cache search glib
to try and find the package myself, but there's literally hundreds of results returned to me, and I'm not sure which one is the one I need. If I remove ScreenFetch from the bashrc then I don't get any errors. After the first 4 lines ScreenFetch runs fine and I can use terminal normally, it's just a little bit annoying that's all.
Any help would be very appreciated.
Edit: sorry, forgot to include the line in my bashrc file. Here it is:
# start screenfetch
screenfetch
command-line glib
command-line glib
asked Dec 12 '15 at 11:38
reelyard
2619
2619
Edit your question and add the output ofpython -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01
add a comment |
Edit your question and add the output ofpython -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01
Edit your question and add the output of
python -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
Edit your question and add the output of
python -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01
add a comment |
3 Answers
3
active
oldest
votes
The module is in the packages python-dbus
, python3-dbus
and in some other packages, see below. /usr/bin/unity
depends on Python2. And for this reason:
sudo apt-get install --reinstall python-dbus
List of available glib.py
% apt-file search --regex /glib.py$
libglib2.0-0-dbg: /usr/share/glib-2.0/gdb/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/mainloop/glib.py
python-pyudev: /usr/lib/python2.7/dist-packages/pyudev/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/main/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/utils/runner/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/main/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/runner/glib.py
python-ubuntuone-devtools: /usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/reactors/glib.py
python-xmmsclient: /usr/lib/python2.7/dist-packages/xmmsclient/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/mainloop/glib.py
python3-pyudev: /usr/lib/python3/dist-packages/pyudev/glib.py
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
add a comment |
You need to install the python gtk libraries to get access to python's "glib" module. In 15.10:
sudo apt-get install python-gtk2
add a comment |
This is defiantly a problem with Unity. When Unity was compiled it didn't build glib properly on your machine. I am not going to tell you to reinstall Unity. If the program still runs smoothly you shouldn't need to worry.
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f708777%2fimporterror-no-module-named-glib-when-running-screenfetch%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The module is in the packages python-dbus
, python3-dbus
and in some other packages, see below. /usr/bin/unity
depends on Python2. And for this reason:
sudo apt-get install --reinstall python-dbus
List of available glib.py
% apt-file search --regex /glib.py$
libglib2.0-0-dbg: /usr/share/glib-2.0/gdb/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/mainloop/glib.py
python-pyudev: /usr/lib/python2.7/dist-packages/pyudev/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/main/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/utils/runner/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/main/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/runner/glib.py
python-ubuntuone-devtools: /usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/reactors/glib.py
python-xmmsclient: /usr/lib/python2.7/dist-packages/xmmsclient/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/mainloop/glib.py
python3-pyudev: /usr/lib/python3/dist-packages/pyudev/glib.py
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
add a comment |
The module is in the packages python-dbus
, python3-dbus
and in some other packages, see below. /usr/bin/unity
depends on Python2. And for this reason:
sudo apt-get install --reinstall python-dbus
List of available glib.py
% apt-file search --regex /glib.py$
libglib2.0-0-dbg: /usr/share/glib-2.0/gdb/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/mainloop/glib.py
python-pyudev: /usr/lib/python2.7/dist-packages/pyudev/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/main/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/utils/runner/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/main/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/runner/glib.py
python-ubuntuone-devtools: /usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/reactors/glib.py
python-xmmsclient: /usr/lib/python2.7/dist-packages/xmmsclient/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/mainloop/glib.py
python3-pyudev: /usr/lib/python3/dist-packages/pyudev/glib.py
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
add a comment |
The module is in the packages python-dbus
, python3-dbus
and in some other packages, see below. /usr/bin/unity
depends on Python2. And for this reason:
sudo apt-get install --reinstall python-dbus
List of available glib.py
% apt-file search --regex /glib.py$
libglib2.0-0-dbg: /usr/share/glib-2.0/gdb/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/mainloop/glib.py
python-pyudev: /usr/lib/python2.7/dist-packages/pyudev/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/main/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/utils/runner/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/main/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/runner/glib.py
python-ubuntuone-devtools: /usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/reactors/glib.py
python-xmmsclient: /usr/lib/python2.7/dist-packages/xmmsclient/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/mainloop/glib.py
python3-pyudev: /usr/lib/python3/dist-packages/pyudev/glib.py
The module is in the packages python-dbus
, python3-dbus
and in some other packages, see below. /usr/bin/unity
depends on Python2. And for this reason:
sudo apt-get install --reinstall python-dbus
List of available glib.py
% apt-file search --regex /glib.py$
libglib2.0-0-dbg: /usr/share/glib-2.0/gdb/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/glib.py
python-dbus: /usr/lib/python2.7/dist-packages/dbus/mainloop/glib.py
python-pyudev: /usr/lib/python2.7/dist-packages/pyudev/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/main/glib.py
python-ubuntu-kylin-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-kylin-sso-client/ubuntu_kylin_sso/utils/runner/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/main/glib.py
python-ubuntu-sso-client: /usr/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/runner/glib.py
python-ubuntuone-devtools: /usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/reactors/glib.py
python-xmmsclient: /usr/lib/python2.7/dist-packages/xmmsclient/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/glib.py
python3-dbus: /usr/lib/python3/dist-packages/dbus/mainloop/glib.py
python3-pyudev: /usr/lib/python3/dist-packages/pyudev/glib.py
answered Dec 12 '15 at 11:47
A.B.
67.9k12164254
67.9k12164254
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
add a comment |
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
I ran the first command which reinstalled python-dbus, but that didn't fix the issue. So then I did a sudo install on libglib2.0-0-dbg to see if that would help but again, it didn't fix the problem. I've decided to uninstall ScreenFetch and use Archey instead. Thanks for your help though.
– reelyard
Dec 12 '15 at 12:00
add a comment |
You need to install the python gtk libraries to get access to python's "glib" module. In 15.10:
sudo apt-get install python-gtk2
add a comment |
You need to install the python gtk libraries to get access to python's "glib" module. In 15.10:
sudo apt-get install python-gtk2
add a comment |
You need to install the python gtk libraries to get access to python's "glib" module. In 15.10:
sudo apt-get install python-gtk2
You need to install the python gtk libraries to get access to python's "glib" module. In 15.10:
sudo apt-get install python-gtk2
answered Jan 29 '16 at 19:22
Tim
213
213
add a comment |
add a comment |
This is defiantly a problem with Unity. When Unity was compiled it didn't build glib properly on your machine. I am not going to tell you to reinstall Unity. If the program still runs smoothly you shouldn't need to worry.
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
add a comment |
This is defiantly a problem with Unity. When Unity was compiled it didn't build glib properly on your machine. I am not going to tell you to reinstall Unity. If the program still runs smoothly you shouldn't need to worry.
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
add a comment |
This is defiantly a problem with Unity. When Unity was compiled it didn't build glib properly on your machine. I am not going to tell you to reinstall Unity. If the program still runs smoothly you shouldn't need to worry.
This is defiantly a problem with Unity. When Unity was compiled it didn't build glib properly on your machine. I am not going to tell you to reinstall Unity. If the program still runs smoothly you shouldn't need to worry.
answered Dec 12 '15 at 11:41
Hayden
166
166
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
add a comment |
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
answering to Hayden: No, it's not a Unity only issue, arises also in Xfce (Xubuntu 18.04.1)
– Gaetano Gallozzi
Dec 11 at 11:36
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f708777%2fimporterror-no-module-named-glib-when-running-screenfetch%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Edit your question and add the output of
python -c 'import sys; print sys.path'
– A.B.
Dec 12 '15 at 11:57
@A.B. I'm confused, why do I need to change the question? And what does the link of code you've quoted mean/do?
– reelyard
Dec 12 '15 at 12:01