简体   繁体   English

如何在没有互联网连接的Windows XP计算机上安装Python psutil库?

[英]How do I install the Python psutil library on a Windows XP machine without an internet connection?

I have a Windows XP machine which I'm trying to deploy to with an automated script without an internet connection. 我有一台Windows XP计算机,正在尝试使用自动脚本将其部署到没有Internet连接的情况。 Part of my Python script requires the pymodbus3 library and though I've managed to get a lot of the required packages installed, I'm struggling to sort out psutil . 我的Python脚本的一部分需要pymodbus3库,尽管我设法安装了许多必需的软件包,但我仍在努力整理psutil

If I try installing it from the source I get the following error message: 如果尝试从源代码安装它,则会收到以下错误消息:

D:\ZP300\Scripts\Z300Diagnostics>easy_install psutil-2.2.1.tar.gz
Processing psutil-2.2.1.tar.gz
Writing c:\docume~1\admini~1\locals~1\temp\easy_install-lgcclk\psutil-2.2.1\setup.cfg
Running psutil-2.2.1\setup.py -q bdist_egg --dist-dir c:\docume~1\admini~1\locals~1\temp\easy_install-lgcclk\psutil-2.2.1\egg-dist-tmp-x_z0ii
warning: no previously-included files matching '*' found under directory 'docs\_build'
error: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

If I try to use the windows installer, there doesn't seem to be a way to run the installer without launching the GUI. 如果我尝试使用Windows Installer,似乎没有一种方法可以在不启动GUI的情况下运行安装程序。

Is there a way to install from source without visual studio 2010 or to launch the windows installer without requiring a user? 有没有一种方法可以在没有Visual Studio 2010的情况下从源代码安装,也可以在不需要用户的情况下启动Windows Installer?

在SO上找到了一个解决方案 ,它实际上比我想象的要容易:

easy_install psutil-2.2.1.win32-py3.3.exe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM