python - 安装Python winshell后Winshell报错win32con not found

标签 python python-3.x pip python-winshell

Traceback (most recent call last):
  File "C:/Users/owner/Desktop/2/test2.py", line 1, in <module>
    import os, winshell
  File "C:\py35\lib\site-packages\winshell.py", line 30, in <module>
    import win32con
ImportError: No module named 'win32con'

我看过: http://error.news/question/6131746/why-does-pip-install-winshell-not-work-on-python-v342/

但我单独安装了 pywin32 64 位并通过 exe 完成:

https://drive.google.com/file/d/0B2FZnKhR7OOJZ1hYZER2WUwyUzA/view?usp=sharing&resourcekey=0-smer5McVyGEsbvsm6DJPHg

那么如何:Why does pip install winshell not work on Python v3.4.2?

错了,没有。我单独安装了它。

然后我去看了:What's win32con module in python? Where can I find it?

我需要知道:我需要做什么才能让 winshell 工作。我已经手动安装了 pywin32(64 位),我运行了 pywin32(64 位)的 exe 并成功完成了它,然后我进入 CMD 并做了:

cd c:\py35\scripts
pip install winshell

安装成功。但是导入winshell还是不行!

最佳答案

终于成功了 我做了什么: 使用提升的权限和命令运行 C​​MD:

cd pathto\pythondirectory\scripts
pywin32_postinstall.py -install

事实证明,如果您没有完整的管理员权限,这将无法运行并且 DLL 也无法正确复制。

还有一个非常值得注意的页面:https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/

关于python - 安装Python winshell后Winshell报错win32con not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33591093/

相关文章:

python - 为什么 Python 中没有定义 UserSet 类?

python-3.x - 选择 DF 中的特定列和随机列(python3、pandas)

python - 如何在 Python 进程之间共享数据?

python - openpyxl线程安全吗?

python - django 从 root : FileNotFoundError 读取文件

python - Django 创建与现有外键数据库条目相对应的新条目

python-3.x - 哪种方法 dm 或 dbow 适用于使用 Doc2Vec 的文档相似性?

python-2.7 - 如何使用python2.7在64位Windows 10机器上安装lxml

python - 使用 pip 和诗歌与 python 3.10.4 安装 TensorFlow 2.8.0 错误

python - 安装 pip 而无需 root 失败