ERROR: Failed building wheel for grpcio 或者DEPRECATION: Python 3.5 reached the end of its life on S

本文介绍了如何处理Python3.5已到达生命周期终点的问题,建议升级到Python3.8。详细步骤包括:退出当前环境、删除旧环境、创建新环境、安装TensorFlow以及测试安装是否成功。提供了相关指令,并提醒读者注意避免使用已废弃的Python版本,以节省时间并保持软件的最新状态。
部署运行你感兴趣的模型镜像

 像上面这样的错误,是因为这一行就已经出现问题了:

DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.

他的意思是Python3.5要挂掉了,所以你不要配置Python3.5,你可以用Python3.8(我的就是3.8),在此之前,你要删掉现在的一些东西,输入下面的指令就好了:

1.退出建立的环境

deactivate

2.删除此环境

 conda remove -n tensorflow --all(红色字体改成你的环境名,我设置的是tensorflow)

3.重新建立环境

conda create -n tensorflow1 python=3.8(我的是python=3.8,其他的我不知道,这个3.8可以的)

4.安装tensorflow

pip install tensorflow

5.测试tensorflow(用我的测试吧,网上好多的教程的测试代码都已经老掉牙了,根本没办法用)

import tensorflow as tf
tf.compat.v1.disable_eager_execution() 
hello = tf.constant('hello,tensorflow')
sess= tf.compat.v1.Session()
print(sess.run(hello))
 


参考链接:https://blog.youkuaiyun.com/weixin_45935201/article/details/120694522

下面这个也不错,大家可以参考学习学习。避免踩坑,我不知道以后这个东西会不会变化,不过至少我发现之前python=3.5是不行的,我浪费了很多时间,希望大家从我这开始,学习更新的一些东西来解决问题

(24条消息) RuntimeError: The Session graph is empty. Add operations to the graph before calling run().解决方法_爱学习的人工智障的博客-优快云博客

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

(.venv) PS C:\Users\V82406169\PycharmProjects\test2> pip install "uiautomator2==0.1.12.dev5" DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop su pport for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#pytho n-2-support pip 21.0 will remove support for this functionality. Collecting uiautomator2==0.1.12.dev5 Downloading uiautomator2-0.1.12.dev5.tar.gz (549 kB) |████████████████████████████████| 549 kB 44 kB/s Requirement already satisfied: requests>=2.7.0 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (2.27.1) Requirement already satisfied: six in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.17.0) Requirement already satisfied: humanize in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.0.0) Requirement already satisfied: fire in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.7.0) Requirement already satisfied: docopt in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.6.2) Requirement already satisfied: progress>=1.3 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.6) Requirement already satisfied: retry>=0.9.2 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.9.2) Requirement already satisfied: whichcraft in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (0.6.1) Requirement already satisfied: logzero in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (1.7.0) Requirement already satisfied: pillow in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from uiautomator2==0.1.12.dev5) (6.2.2) Collecting lxml Using cached lxml-5.0.2.tar.gz (3.9 MB) Requirement already satisfied: chardet<5,>=3.0.2; python_version < "3" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0- >uiautomator2==0.1.12.dev5) (4.0.0) Requirement already satisfied: idna<3,>=2.5; python_version < "3" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiau tomator2==0.1.12.dev5) (2.10) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiautomator2==0.1 .12.dev5) (1.26.20) Requirement already satisfied: certifi>=2017.4.17 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from requests>=2.7.0->uiautomator2==0.1.12 .dev5) (2021.10.8) Requirement already satisfied: termcolor in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from fire->uiautomator2==0.1.12.dev5) (1.1.0) Requirement already satisfied: decorator>=3.4.2 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from retry>=0.9.2->uiautomator2==0.1.12.dev5 ) (4.4.2) Requirement already satisfied: py<2.0.0,>=1.4.26 in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from retry>=0.9.2->uiautomator2==0.1.12.dev 5) (1.11.0) Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\v82406169\pycharmprojects\test2\.venv\lib\site-packages (from logzero->uiautomator2= =0.1.12.dev5) (0.4.6) Building wheels for collected packages: uiautomator2, lxml Building wheel for uiautomator2 (setup.py) ... done Created wheel for uiautomator2: filename=uiautomator2-0.1.12.dev5-py2-none-any.whl size=194568 sha256=a64b077c91bca36a1e9f86648b02933c664d028466b387ffd0fbf9669 01cbf94 Stored in directory: c:\users\v82406169\appdata\local\pip\cache\wheels\da\7c\e0\777110fbee314b58f533b6bb9aeedff487c31aae8dc7fa68b7 Building wheel for lxml (setup.py) ... error ERROR: Command errored out with exit status 1: command: &#39;C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe&#39; -u -c &#39;import sys, setuptools, tokenize; sys.argv[0] = &#39;"&#39;"&#39;c:\\users\\v82406~1\\ appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39;; __file__=&#39;"&#39;"&#39;c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39;;f =getattr(tokenize, &#39;"&#39;"&#39;open&#39;"&#39;"&#39;, open)(__file__);code=f.read().replace(&#39;"&#39;"&#39;\r\n&#39;"&#39;"&#39;, &#39;"&#39;"&#39;\n&#39;"&#39;"&#39;);f.close();exec(compile(code, __file__, &#39;"&#39;"&#39;exec&#39;"&#39;"&#39;))&#39; b dist_wheel -d &#39;c:\users\v82406~1\appdata\local\temp\pip-wheel-scsmyn&#39; cwd: c:\users\v82406~1\appdata\local\temp\pip-install-c1vhye\lxml\ Complete output (102 lines): Building lxml version 5.0.2. Building without Cython. Building against pre-built libxml2 andl libxslt libraries running bdist_wheel running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\lxml copying src\lxml\builder.py -> build\lib.win32-2.7\lxml copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml copying src\lxml\sax.py -> build\lib.win32-2.7\lxml copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml creating build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\html copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html creating build\lib.win32-2.7\lxml\isoschematron copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron copying src\lxml\etree.h -> build\lib.win32-2.7\lxml copying src\lxml\etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\etree.pyx -> build\lib.win32-2.7\lxml copying src\lxml\objectify.pyx -> build\lib.win32-2.7\lxml copying src\lxml\apihelpers.pxi -> build\lib.win32-2.7\lxml copying src\lxml\classlookup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\cleanup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\debug.pxi -> build\lib.win32-2.7\lxml copying src\lxml\docloader.pxi -> build\lib.win32-2.7\lxml copying src\lxml\dtd.pxi -> build\lib.win32-2.7\lxml copying src\lxml\extensions.pxi -> build\lib.win32-2.7\lxml copying src\lxml\iterparse.pxi -> build\lib.win32-2.7\lxml copying src\lxml\nsclasses.pxi -> build\lib.win32-2.7\lxml copying src\lxml\objectpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parsertarget.pxi -> build\lib.win32-2.7\lxml copying src\lxml\proxy.pxi -> build\lib.win32-2.7\lxml copying src\lxml\public-api.pxi -> build\lib.win32-2.7\lxml copying src\lxml\readonlytree.pxi -> build\lib.win32-2.7\lxml copying src\lxml\relaxng.pxi -> build\lib.win32-2.7\lxml copying src\lxml\saxparser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\schematron.pxi -> build\lib.win32-2.7\lxml copying src\lxml\serializer.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xinclude.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlerror.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlid.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlschema.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xslt.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xsltext.pxi -> build\lib.win32-2.7\lxml copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\isoschematron\resources creating build\lib.win32-2.7\lxml\isoschematron\resources\rng copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematro n-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-x slt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schema tron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl \iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron -xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building &#39;lxml.etree&#39; extension error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 ---------------------------------------- ERROR: Failed building wheel for lxml Running setup.py clean for lxml Successfully built uiautomator2 Failed to build lxml Installing collected packages: lxml, uiautomator2 Running setup.py install for lxml ... error ERROR: Command errored out with exit status 1: command: &#39;C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe&#39; -u -c &#39;import sys, setuptools, tokenize; sys.argv[0] = &#39;"&#39;"&#39;c:\\users\\v82406~1 \\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39;; __file__=&#39;"&#39;"&#39;c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39; ;f=getattr(tokenize, &#39;"&#39;"&#39;open&#39;"&#39;"&#39;, open)(__file__);code=f.read().replace(&#39;"&#39;"&#39;\r\n&#39;"&#39;"&#39;, &#39;"&#39;"&#39;\n&#39;"&#39;"&#39;);f.close();exec(compile(code, __file__, &#39;"&#39;"&#39;exec&#39;"&#39;"&#39;))&#39; install --record &#39;c:\users\v82406~1\appdata\local\temp\pip-record-y0cvp8\install-record.txt&#39; --single-version-externally-managed --compile --install-headers &#39;C: \Users\V82406169\PycharmProjects\test2\.venv\include\site\python2.7\lxml&#39; cwd: c:\users\v82406~1\appdata\local\temp\pip-install-c1vhye\lxml\ Complete output (102 lines): Building lxml version 5.0.2. Building without Cython. Building against pre-built libxml2 andl libxslt libraries running install running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\lxml copying src\lxml\builder.py -> build\lib.win32-2.7\lxml copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml copying src\lxml\sax.py -> build\lib.win32-2.7\lxml copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml creating build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.py -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\html copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html creating build\lib.win32-2.7\lxml\isoschematron copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron copying src\lxml\etree.h -> build\lib.win32-2.7\lxml copying src\lxml\etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree.h -> build\lib.win32-2.7\lxml copying src\lxml\lxml.etree_api.h -> build\lib.win32-2.7\lxml copying src\lxml\etree.pyx -> build\lib.win32-2.7\lxml copying src\lxml\objectify.pyx -> build\lib.win32-2.7\lxml copying src\lxml\apihelpers.pxi -> build\lib.win32-2.7\lxml copying src\lxml\classlookup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\cleanup.pxi -> build\lib.win32-2.7\lxml copying src\lxml\debug.pxi -> build\lib.win32-2.7\lxml copying src\lxml\docloader.pxi -> build\lib.win32-2.7\lxml copying src\lxml\dtd.pxi -> build\lib.win32-2.7\lxml copying src\lxml\extensions.pxi -> build\lib.win32-2.7\lxml copying src\lxml\iterparse.pxi -> build\lib.win32-2.7\lxml copying src\lxml\nsclasses.pxi -> build\lib.win32-2.7\lxml copying src\lxml\objectpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\parsertarget.pxi -> build\lib.win32-2.7\lxml copying src\lxml\proxy.pxi -> build\lib.win32-2.7\lxml copying src\lxml\public-api.pxi -> build\lib.win32-2.7\lxml copying src\lxml\readonlytree.pxi -> build\lib.win32-2.7\lxml copying src\lxml\relaxng.pxi -> build\lib.win32-2.7\lxml copying src\lxml\saxparser.pxi -> build\lib.win32-2.7\lxml copying src\lxml\schematron.pxi -> build\lib.win32-2.7\lxml copying src\lxml\serializer.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xinclude.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlerror.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlid.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xmlschema.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xpath.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xslt.pxi -> build\lib.win32-2.7\lxml copying src\lxml\xsltext.pxi -> build\lib.win32-2.7\lxml copying src\lxml\includes\c14n.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\config.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\relaxng.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\schematron.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\tree.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\uri.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xinclude.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xpath.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\xslt.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\__init__.pxd -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\etree_defs.h -> build\lib.win32-2.7\lxml\includes copying src\lxml\includes\lxml-version.h -> build\lib.win32-2.7\lxml\includes creating build\lib.win32-2.7\lxml\isoschematron\resources creating build\lib.win32-2.7\lxml\isoschematron\resources\rng copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schemat ron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron -xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-sche matron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\x sl\iso-schematron-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematr on-xslt1 copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building &#39;lxml.etree&#39; extension error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 ---------------------------------------- ERROR: Command errored out with exit status 1: &#39;C:\Users\V82406169\PycharmProjects\test2\.venv\Scripts\python.exe&#39; -u -c &#39;import sys, setuptools, tokenize; sys.a rgv[0] = &#39;"&#39;"&#39;c:\\users\\v82406~1\\appdata\\local\\temp\\pip-install-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39;; __file__=&#39;"&#39;"&#39;c:\\users\\v82406~1\\appdata\\local\\temp\\pip-in stall-c1vhye\\lxml\\setup.py&#39;"&#39;"&#39;;f=getattr(tokenize, &#39;"&#39;"&#39;open&#39;"&#39;"&#39;, open)(__file__);code=f.read().replace(&#39;"&#39;"&#39;\r\n&#39;"&#39;"&#39;, &#39;"&#39;"&#39;\n&#39;"&#39;"&#39;);f.close();exec(compile( code, __file__, &#39;"&#39;"&#39;exec&#39;"&#39;"&#39;))&#39; install --record &#39;c:\users\v82406~1\appdata\local\temp\pip-record-y0cvp8\install-record.txt&#39; --single-version-externally-manage d --compile --install-headers &#39;C:\Users\V82406169\PycharmProjects\test2\.venv\include\site\python2.7\lxml&#39; Check the logs for full command output.
最新发布
11-22
你遇到的错误信息表明: ``` DEPRECATION: Python 3.5 reached the end of its life... ERROR: Could not find a version that satisfies the requirement onnxruntime ERROR: No matching distribution found for onnxruntime ``` ### 问题原因: 1. **Python 3.5 已停止支持**: - Python 3.52020 年 9 月 13 日正式 **EOL(End Of Life)**,官方不再维护。 - pip 21.0 及以后版本 **不再支持 Python 3.5**,所以无法再通过 pip 安装现代的 Python 包(如 `onnxruntime`)。 2. **onnxruntime 不再支持 Python 3.5**: - `onnxruntime` 是一个较新的库,只支持 Python 3.6 及以上版本。 - 因此 pip 无法找到适用于 Python 3.5 的 `onnxruntime` 包。 --- ### 解决方法: #### ✅ 升级 Python3.6 或更高版本 这是最根本、最推荐的解决办法。 ##### 在 Linux/macOS 上安装新版本 Python: 你可以使用 [pyenv](https://github.com/pyenv/pyenv) 来安装和管理多个 Python 版本: ```bash # 安装 pyenv curl https://pyenv.run | bash # 安装 Python 3.10(或其他 >=3.6 的版本) pyenv install 3.10.13 pyenv global 3.10.13 # 验证安装 python --version ``` ##### 在 Windows 上: 前往 [Python 官网](https://www.python.org/downloads/) 下载最新版本(建议 3.10 或 3.11)并安装,安装时勾选 **"Add to PATH"**。 --- #### ✅ 使用虚拟环境(推荐) 安装完新版本 Python 后,推荐使用虚拟环境来管理依赖: ```bash python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows pip install onnxruntime ``` --- #### ✅ 如果无法升级 Python(不推荐) 如果你**确实无法升级 Python**,可以尝试寻找旧版本的 `onnxruntime` 轮子(`.whl` 文件),但这非常不推荐,因为: - 安全性无法保证。 - 很难找到兼容的 wheel。 - 缺乏社区支持。 --- ### 总结问题原因: - 使用了已停止维护的 Python 3.5。 - `onnxruntime` 和现代 pip 不再支持 Python 3.5。 - 导致 pip 无法找到匹配的包进行安装。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值