用 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)