在尝试安装PyCharm和eror时,无法导入xlwings



我想在PyCharm上导入xlwings,但我得到了Eror:

C:PythonAnalize_DatavenvScriptspython.exe C:/Python/Analize_Data/the_class.py
Traceback (most recent call last):
File "C:/Python/Analize_Data/the_class.py", line 3, in <module>
import xlwings as xw
ModuleNotFoundError: No module named 'xlwings'
Process finished with exit code 1

所以我尝试从文件安装它->设置->项目口译员,但我得到了另一个eror:

Collecting xlwings
Using cached https://files.pythonhosted.org/packages/63/20/b131eb5c3f35c721ba473e824b569f995994c32f1b2829a14d0b24aeb78e/xlwings-0.20.7.tar.gz
Collecting comtypes (from xlwings)
Using cached https://files.pythonhosted.org/packages/fb/b8/f8aa21774acb4535e32f6a89055876ca497ff806f9b1b1912b469284a61e/comtypes-1.1.7.zip
Collecting pywin32>=224 (from xlwings)
Could not find a version that satisfies the requirement pywin32>=224 (from xlwings) (from versions: )
No matching distribution found for pywin32>=224 (from xlwings)

在pip上安装它没有什么区别。已尝试安装pywin32。也不起作用:

Collecting pywin32
Could not find a version that satisfies the requirement pywin32 (from versions: )
No matching distribution found for pywin32

我在这里做错了什么?

您的python版本是什么?Python 2还是3?请尝试先安装pip install pypiwin32

最新更新