ImportError: 没有模块命名 'gdbm', 使用时出现 source ~/. bashrc
嘿,在做一些改变之后 bashrc 我试着用
但收到以下错误
我试图使用安装命令,如错误所示
此外,提到了一些决定使用特定于版本的命令,但仍然没有解决方案
安装命令 pip 给出了以下错误消息
请提供处理这些错误的方法。
</module></module></module></module></module></module>
source ~/.bashrc
但收到以下错误
baaz@FireStorm:~$ source ~/.bashrc
Traceback /most recent call last/:
File "/usr/lib/python3.5/dbm/gnu.py", line 4, in <module>
from _gdbm import *
ImportError: No module named '_gdbm'
During handling of the above exception, another exception occurred:
Traceback /most recent call last/:
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in <module>
import dbm.gnu as gdbm
File "/usr/lib/python3.5/dbm/gnu.py", line 6, in <module>
raise ImportError/str/msg/ + ', please install the python3-gdbm package'/
ImportError: No module named '_gdbm', please install the python3-gdbm package
During handling of the above exception, another exception occurred:
Traceback /most recent call last/:
File "/usr/lib/command-not-found", line 27, in <module>
from CommandNotFound.util import crash_guard
File "/usr/lib/python3/dist-packages/CommandNotFound/__init__.py", line 3, in <module>
from CommandNotFound.CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 9, in <module>
import gdbm
ImportError: No module named 'gdbm'
我试图使用安装命令,如错误所示
baaz@FireStorm:~$ sudo apt-get install python3-gdbm
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-gdbm is already the newest version /3.6.5-3~16.04.york0.2/.
python3-gdbm set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
此外,提到了一些决定使用特定于版本的命令,但仍然没有解决方案
baaz@FireStorm:~$ sudo apt-get install python3.5-gdbm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3.5-gdbm is a virtual package provided by:
python3-gdbm 3.5.1-1 [Not candidate version]
E: Package 'python3.5-gdbm' has no installation candidate
安装命令 pip 给出了以下错误消息
baaz@FireStorm:~$ sudo pip3 install gdbm --upgrade
The directory '/home/baaz/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/baaz/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting gdbm
Could not find a version that satisfies the requirement gdbm /from versions: /
No matching distribution found for gdbm
请提供处理这些错误的方法。
</module></module></module></module></module></module>
没有找到相关结果
已邀请:
2 个回复
窦买办
赞同来自:
为我工作。
跑步
看起来 gdbm 在我的电脑上安装了一些原因 python3.6, 而不是 python3.5, 但我的Python3版本是 python3.5 /最后一次我检查了这一点 python3.6 有些东西突破了 ubuntu 16.04/.
当他们逃离时你得到的错误
抱怨版本的问题,因此他们注意到的版本的手动安装,工作。
龙天
赞同来自:
注意
在名称链接中。