报错信息
(venv) D:\pyvenv_xlwings64\venv>pip list
Package Version


comtypes 1.1.7
pip 19.2.3
PyQt5 5.13.1
PyQt5-sip 4.19.19
pywin32 225
setuptools 41.2.0
wheel 0.33.6
xlwings 0.15.3

(venv) D:\pyvenv_xlwings64\venv>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import xlwings
Traceback (most recent call last):
File “”, line 1, in
File “D:\pyvenv_xlwings64\venv\lib\site-packages\xlwings_init_.py”, line 42, in
from . import _xlwindows as xlplatform
File “D:\pyvenv_xlwings64\venv\lib\site-packages\xlwings_xlwindows.py”, line 10, in
import win32api
ImportError: DLL load failed: 找不到指定的程序。

问题原因
224、225新版本发布的有问题,回退到223版本即可

(venv) D:\pyvenv_xlwings64\venv>pip install pywin32223
Collecting pywin32
223
Downloading https://files.pythonhosted.org/packages/9f/9d/f4b2170e8ff5d825cd4398856fee88f6c70c60bce0aa8411ed17c1e1b21f/pywin32-223-cp36-cp36m-win_amd64.whl (9.0MB)
|████████████████████████████████| 9.0MB 218kB/s
Installing collected packages: pywin32
Successfully installed pywin32-223

(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>pip list
Package Version


comtypes 1.1.7
pip 19.2.3
PyQt5 5.13.1
PyQt5-sip 4.19.19
pywin32 223
setuptools 41.2.0
wheel 0.33.6
xlwings 0.15.3

(venv) D:\pyvenv_xlwings64\venv>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import xlwings

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐