gpt4 book ai didi

python - 不能用pip安装elementtree

转载 作者:太空狗 更新时间:2023-10-29 20:12:15 26 4
gpt4 key购买 nike

正在尝试使用 pip 安装 elementtree 包。出现以下错误:

    (taximachine_env)vagrant@dev-gm:/opt/taxi/taxiconsole$ pip install elementtree -vvv
Collecting elementtree
Getting page https://pypi.python.org/simple/elementtree/
1 location(s) to search for versions of elementtree:
* https://pypi.python.org/simple/elementtree/
Getting page https://pypi.python.org/simple/elementtree/
Analyzing links from page https://pypi.python.org/simple/elementtree/
Could not find a version that satisfies the requirement elementtree (from versions: )
Cleaning up...
No matching distribution found for elementtree
Exception information:
Traceback (most recent call last):
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/commands/install.py", line 294, in run
requirement_set.prepare_files(finder)
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 461, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/req/req_install.py", line 250, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/opt/taxi/envs/taximachine_env/local/lib/python2.7/site-packages/pip/index.py", line 571, in find_requirement
'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for elementtree

PyPI link返回以下响应:

<head>
<title>Links for elementtree</title>
<meta name="api-version" value="2">
<style type="text/css"></style>
</head>

<body>
<h1>Links for elementtree</h1>
</body>

</html>

还有其他方法可以安装elementtree吗?

最佳答案

它在标准库中:http://docs.python.org/2/library/xml.etree.elementtree.html .无需使用 pip 安装。

关于python - 不能用pip安装elementtree,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34566142/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com