我是 Ubuntu 新手。尝试设置 python(用于 Ansible 控制系统)。作为此设置的一部分,我需要安装 xmltodict 和 markupsafe。我想我缺少一些配置设置部分。
环境#
带有 VirtualBox 的 Windows 10,其上装有 Ubuntu 18.x vbox。pip
--version (pip 9.0.1 来自 /usr/lib/python2.7/dist-packages (python 2.7)
$ pip install xmltodict
No matching distribution found for xmltodict
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 514, in find_requirement
'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for xmltodict
答案1
https://stackoverflow.com/questions/21699688/pip-install-xmltodict-not-working
这是同样的问题。您可以在 ubuntu 上安装:
sudo apt-get install -y python-xmltodict