本文介绍了为什么pip install winshell在Python v3.4.2上不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用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)
解决方案
您将需要安装 pywin32 获取丢失的文件.
它必须单独安装(即不能与pip一起安装).有关更多信息,请参见这篇文章. /p>
Install winshell with pip:
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...
Try and import it:
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'
Why does this fail?
Pip version is as follows:
C:\Users\jonc>pip -V
pip 1.5.6 from C:\Python34\lib\site-packages (python 3.4)
解决方案
you will need to install pywin32 to get the missing file.
it must be installed separately (i.e. it cannot be installed with pip). for more information see this post.
这篇关于为什么pip install winshell在Python v3.4.2上不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!