Python 3.4在Windows 7 x64上安装psutil

时间:2014-04-16 08:36:48

标签: python psutil

我正在尝试从源码psutil 2.1.0安装Python 3.4。我的操作系统是Windows 7 x64。我收到错误:

c:\Python34\psutil-2.1.0>python setup.py install --verbose
running install
running bdist_egg
running egg_info
writing top-level names to psutil.egg-info\top_level.txt
writing psutil.egg-info\PKG-INFO
writing dependency_links to psutil.egg-info\dependency_links.txt
reading manifest file 'psutil.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs
build'
writing manifest file 'psutil.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\psutil
copying psutil\_common.py -> build\lib.win32-3.4\psutil
copying psutil\_compat.py -> build\lib.win32-3.4\psutil
copying psutil\_psbsd.py -> build\lib.win32-3.4\psutil
copying psutil\_pslinux.py -> build\lib.win32-3.4\psutil
copying psutil\_psosx.py -> build\lib.win32-3.4\psutil
copying psutil\_psposix.py -> build\lib.win32-3.4\psutil
copying psutil\_pssunos.py -> build\lib.win32-3.4\psutil
copying psutil\_pswindows.py -> build\lib.win32-3.4\psutil
copying psutil\__init__.py -> build\lib.win32-3.4\psutil
running build_ext
building '_psutil_windows' extension
error: Unable to find vcvarsall.bat
你能帮帮我吗?提前致谢

2 个答案:

答案 0 :(得分:0)

vcvarsall.bat看起来像是Microsoft Visual Studio的依赖项。
请参阅:Python issue:Unable to find vcvarsall.bat

您可以尝试手动安装它。从这里获取amd64 py3.4构建:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#psutil

然后安装它。如果失败,请使用7-Zip打开.exe并将包含的文件夹解压缩到您的站点包。

答案 1 :(得分:0)

尝试我的经验。我希望它会有所帮助 我安装了Ptython 3.4。我试图安装' paramiko' modul和我收到了一条错误消息(vcvarsall.bat)

所以在那之后我做了以下事情:
1. 安装MinGW (参见页面http://docs.cython.org/src/tutorial/appendix.html
2. 安装pycrypto2.6.1 (我在此处找到了它 - https://github.com/axper/python3-pycrypto-windows-installer
其他python版本请参阅此页 - www.voidspace.org.uk/python/modules.shtml#pycrypto
3. 检查