0

用 pip 安装 winshell:

C:\Users\jonc>pip install winshell
Downloading/unpacking winshell
  Downloading winshell-0.6.zip
  Running setup.py (path:C:\Users\jonc\AppData\Local\Temp\pip_build_Jonc\winshell\setup.py) egg_info for package winshell

Installing collected packages: winshell
  Running setup.py install for winshell

Successfully installed winshell
Cleaning up...

尝试并导入它:

C:\Users\jonc>python
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import winshell
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\site-packages\winshell.py", line 30, in <module>
    import win32con
ImportError: No module named 'win32con'

为什么会失败?

pip版本如下:

C:\Users\jonc>pip -V
pip 1.5.6 from C:\Python34\lib\site-packages (python 3.4)
4

1 回答 1

1

您将需要安装pywin32以获取丢失的文件。
它必须单独安装(即不能用 pip 安装)。欲了解更多信息,请参阅这篇文章

于 2015-04-13T12:43:57.823 回答