python嵌入式版本安装openpyxl失败解决方法
使用嵌入式版本安装第三方包时会引用本机缓存的et_xmlfile,
所以会有如下错误.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | D:\Projects\Inspect\python-3.8.1>python.exe -m pip install openpyxl --cache-dir D:\ -i https://mirrors.aliyun.com/pypi/simple/ Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting openpyxl Downloading https://mirrors.aliyun.com/pypi/packages/95/8c/83563c60489954e5b80f9e2596b93a68e1ac4e4a730deb1aae632066d704/openpyxl-3.0.3.tar.gz (172 kB) |████████████████████████████████| 172 kB 1.7 MB/s Collecting jdcal Downloading https://mirrors.aliyun.com/pypi/packages/f0/da/572cbc0bc582390480bbd7c4e93d14dc46079778ed915b505dc494b37c57/jdcal-1.4.1-py2.py3-none-any.whl (9.5 kB) Collecting et_xmlfile Downloading https://mirrors.aliyun.com/pypi/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz (8.4 kB) ERROR: Command errored out with exit status 1: command: 'D:\Projects\Inspect\python-3.8.1\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\STEVENNL\\AppData\\Local\\Temp\\pip-install-tdhu2qlz\\et-xmlfile\\setup.py'"'"'; __file__='"'"'C:\\Users\\STEVENNL\\AppData\\Local\\Temp\\pip-install-tdhu2qlz\\et-xmlfile\\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\STEVENNL\AppData\Local\Temp\pip-install-tdhu2qlz\et-xmlfile\pip-egg-info' cwd: C:\Users\STEVENNL\AppData\Local\Temp\pip-install-tdhu2qlz\et-xmlfile\ Complete output (5 lines): Traceback (most recent call last): File "< string >", line 1, in < module > File "C:\Users\STEVENNL\AppData\Local\Temp\pip-install-tdhu2qlz\et-xmlfile\setup.py", line 40, in < module > from et_xmlfile import ( ModuleNotFoundError: No module named 'et_xmlfile' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. |
嵌入式安装第三方包:https://www.jianshu.com/p/d4d40cb403d6
解决方法:
下载et_xmlfile,并解压,然后复制解压后的et_xmlfile,et_xmlfile.egg-info两个文件夹到site-packages下
然后再安装openpyxl:python.exe -m pip install openpyxl
本文作者:KiGiBoy
本文链接:https://www.cnblogs.com/ls11736/p/12398376.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步