无法在pycharm中安装xml.etree.elementtree

2024-05-12 14:24:21 发布

您现在位置:Python中文网/ 问答频道 /正文

  Using cached pycopy-xml.etree.ElementTree-0.1.2.tar.gz (1.9 kB)

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
    ERROR: Command errored out with exit status 1:
     command: 'F:\Python\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"'; __file__='"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\hp\AppData\Local\Temp\pip-pip-egg-info-ncg_nv94'
         cwd: C:\Users\hp\AppData\Local\Temp\pycharm-packaging\pycopy-xml-etree-elementtree\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\hp\AppData\Local\Programs\Python\Python37-32\lib\tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Tags: pippylocalsetupxmlusersappdatatemp
1条回答
网友
1楼 · 发布于 2024-05-12 14:24:21

不需要,您不需要安装PyXML:ElementTreeAPI是Python标准库的一部分

here

事实上,PyXML是一个旧的、可能已经过时的软件包,其安装脚本似乎只与Python2兼容。您不需要安装它的另一个原因! 如果您只是将import语句放在代码中,那么它在这方面就不会有任何问题了

相关问题 更多 >