我的操作系统是VirtualBox中的Ubuntu15.10,我发现我无法升级我的操作系统,也无法打开软件中心。 我试过用谷歌搜索这个问题,但当我找到一些方法时我可以试试。。我也会发现更多的新问题。不能解决这些问题。在
我试着详细描述我所做的事情和电脑的状况(错误信息)。。谢谢!在
$软件中心
Traceback (most recent call last):
File "/usr/bin/software-center", line 25, in <module>
from gi.repository import Gtk, GObject
ImportError: No module named gi.repository
我谷歌“没有模块命名地理信息库“发现我需要安装PyGObject,但是。。在
$sudo pip install PyGObject
^{pr2}$在
在
$哪个python(我能/应该把它修改成/usr/bin/python
?)在
/home/thisray/.pyenv/shims/python
$pacman-Qikk python gobject python
XIO: fatal IO error 22 (Invalid argument) on X server ":0"
after 4155 requests (4155 known processed) with 0 events remaining.
$python-c“导入gi;打印(gi.\uu spec\uu)”
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named gi
$python-c“导入gi;打印(gi.\uu dict\uuu)”
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named gi
在
在
在
关于yum
的问题
$sudo apt get install yum
yum is the newest version ( in Taiwanese )
$yum——版本
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.11 (default, Apr 25 2016, 16:08:52)
[GCC 5.2.1 20151010]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
$whereis python
python: /usr/bin/python2.7-config /usr/bin/python3.4m
/usr/bin/python2.7-dbg /usr/bin/python3.4
/usr/bin/python2.7 /usr/bin/python3.5m
/usr/bin/python2.7-dbg-config /usr/bin/python
/usr/bin/python3.5 /usr/lib/python3.4
/usr/lib/python2.7 /usr/lib/python3.5
/etc/python3.4 /etc/python2.7 /etc/python /etc/python3.5
/usr/local/bin/python2.7-config /usr/local/bin/python2.7
/usr/local/lib/python3.4 /usr/local/lib/python2.7
/usr/local/lib/python3.5 /usr/include/python3.4m
/usr/include/python2.7 /usr/include/python3.5m
/usr/include/python2.7_d /usr/share/python
/home/thisray/.pyenv/shims/python3.5m-config
/home/thisray/.pyenv/shims/python2.7-config
/home/thisray/.pyenv/shims/python2.7
/home/thisray/.pyenv/shims/python3.5-config
/home/thisray/.pyenv/shims/python3.5m
/home/thisray/.pyenv/shims/python
/home/thisray/.pyenv/shims/python3.5
/home/thisray/bin/python2.7
/home/thisray/bin/python /usr/share/man/man1/python.1.gz
我尝试了$ sudo vi /usr/bin/yum
并将#!/usr/bin/python
修改为$ whereis python
中的每个路径,并使用不同版本的Python来完成>> import yum
,但是{
在
在
我已经安装了pyenv
,并尝试了三个版本来测试yum
$pyenv版本
* system (set by /home/thisray/.pyenv/version)
2.7.11
3.5.1
(我通常使用$ pyenv global 2.7.11
)
$pip——版本
pip 8.1.1 from /home/thisray/lib/python2.7/site-packages (python 2.7)
$pip列表
pip (8.1.1)
setuptools (20.10.1)
wheel (0.29.0)
$/usr/bin/python2.7-dbg
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/yum/__init__.py", line 23, in <module>
import rpm
File "/usr/lib/python2.7/dist-packages/rpm/__init__.py", line 9, in <module>
from rpm._rpm import *
ImportError: /usr/lib/python2.7/dist-packages/rpm/_rpm.x86_64-linux-gnu.so: undefined symbol: Py_InitModule4_64
[52069 refs]
在
我认为所有问题的根源都是因为我安装了很多不同版本的Python,而我没有使用好的方法来安装/升级它们。。。。在
这是我第一次在这里用英语提问。我希望你能理解我的意思和我的问题所在。非常感谢和抱歉我的英语,我已经尝试解决了一整天。。。如果问题能解决,我将非常感激!在
如果有什么需要测试或解释的,请告诉我,谢谢!!在
目前没有回答
相关问题 更多 >
编程相关推荐