简体   繁体   English

maya2008 win32api 64位python

[英]maya2008 win32api 64 bit python

How is it possible to run import win32api successfully on a 64bit maya version 2008? 如何在64位maya版本2008上成功运行import win32api

The following error occurs: 发生以下错误:

Error: No module named win32api
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named win32api

I need to get mouse cursor position in python so that I can place window exactly in that position. 我需要在python中获得鼠标光标位置,以便我可以将窗口准确放置在该位置。 Is there any other way to get it? 有没有其他方法可以得到它?

Best regards, 最好的祝福,

kNish kNish

Maya uses its own Python installation. Maya使用自己的Python安装。 You need to add the path where pywin32 is installed by one way or another ... you can create a .pth file in 您需要以某种方式添加安装pywin32的路径...您可以在其中创建.pth文件

C:\\Program Files\\Autodesk\\Maya2009\\Python\\Lib\\site-packages\\ C:\\ Program Files \\ Autodesk \\ Maya2009 \\ Python \\ Lib \\ site-packages \\

Also, like Adam pointed out, make sure you have the 64 bit pywin32 installed. 另外,像Adam指出的那样,确保安装了64位pywin32。

Here's an article talking about this subject: 这是一篇关于这个主题的文章:

http://www.rtrowbridge.com/blog/2008/11/27/maya-python-import-scripts/ http://www.rtrowbridge.com/blog/2008/11/27/maya-python-import-scripts/

Edit: 编辑:

Yeah indeed I think they don't provide PyWin32 for Python25 x64: 是的,我认为他们没有为Python25 x64提供PyWin32:

Available for AMD64 versions of Windows for Python 2.6 and later (support for Python 2.5 is just too hard, sorry). 可用于适用于Python 2.6及更高版本的AMD64版本的Windows(对Python 2.5的支持太难了,很抱歉)。 Lots of help from Roger, Steve Yin and Sidnei da Silva. Roger,Steve Yin和Sidnei da Silva提供了很多帮助。

http://sourceforge.net/project/shownotes.php?release_id=603349 http://sourceforge.net/project/shownotes.php?release_id=603349

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

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