jacexh / pyautoit

Python binding for AutoItX3.dll
MIT License
273 stars 74 forks source link

Cannot Install #4

Closed DarthOpto closed 5 years ago

DarthOpto commented 9 years ago

I am trying to install this on a Windows 8.1 64 bit system. I have AutoIT installed and have registered the AutoItX3 dll files for both the 32 bit and 64 bit dlls. When I try the python setup.py install or the pip installation method, I am getting the following error:

[Error 193] %1 is not a valid Win32 Application pyautoit error

jacexh commented 9 years ago

hi, which version of python do you installed?

DarthOpto commented 9 years ago

I have 2.7.9 installed

Curtis Salisbury, MBA, MHRM curtis.salisbury@gmail.com curtissalisbury@yahoo.com

(801)310-4173 (Mobile) (801)899-2143 (Home)

On Tue, Feb 24, 2015 at 9:30 PM, jacexh notifications@github.com wrote:

hi, which version of python do you installed?

— Reply to this email directly or view it on GitHub https://github.com/jacexh/pyautoit/issues/4#issuecomment-75903924.

DarthOpto commented 9 years ago

64 bit version

Curtis Salisbury, MBA, MHRM curtis.salisbury@gmail.com curtissalisbury@yahoo.com

(801)310-4173 (Mobile) (801)899-2143 (Home)

On Wed, Feb 25, 2015 at 10:57 AM, Curtis Salisbury < curtis.salisbury@gmail.com> wrote:

I have 2.7.9 installed

Curtis Salisbury, MBA, MHRM curtis.salisbury@gmail.com curtissalisbury@yahoo.com

(801)310-4173 (Mobile) (801)899-2143 (Home)

On Tue, Feb 24, 2015 at 9:30 PM, jacexh notifications@github.com wrote:

hi, which version of python do you installed?

— Reply to this email directly or view it on GitHub https://github.com/jacexh/pyautoit/issues/4#issuecomment-75903924.

DarthOpto commented 9 years ago

When I attempt to install to a Linux or OSx environment, I am getting the following error:

Traceback (most recent call last): File "", line 17, in File "/tmp/pip_build_root/pyautoit/setup.py", line 9, in import autoit File "autoit/init.py", line 6, in from .autoit import options, properties, commands File "autoit/autoit.py", line 7, in from ctypes.wintypes import * File "/usr/lib/python2.7/ctypes/wintypes.py", line 23, in class VARIANT_BOOL(_SimpleCData): ValueError: type 'v' not supported Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/pyautoit/setup.py", line 9, in

import autoit

File "autoit/init.py", line 6, in

from .autoit import options, properties, commands

File "autoit/autoit.py", line 7, in

from ctypes.wintypes import *

File "/usr/lib/python2.7/ctypes/wintypes.py", line 23, in

class VARIANT_BOOL(_SimpleCData):

ValueError: type 'v' not supported

jacexh commented 9 years ago

Please try 32 bit version of python. autoItx.dll only support for windows, it cannot be installed into Linux/Unix.

jkyeung commented 9 years ago

You included both 32-bit and 64-bit versions of the AutoIt DLL, but your test of whether to use the 64-bit version (near the top of autoit.py) is wrong. The PROGRAMFILES environment variable is always C:\Program Files, no matter the bitness of Windows. I don't think it's important to check the bitness of Windows anyway, because you shouldn't ever have a 64-bit Python on a 32-bit Windows. Therefore, once you have determined that you have a 64-bit Python, you might as well just go ahead and use the 64-bit DLL.

The following lines in autoit.py:

if "(x86)" in os.environ['PROGRAMFILES'] and bit == "64bit":
    # if 64bit version of python within 64bit version of Windows,
    # load AutoItX3_x64.dll
    dll = "AutoItX3_x64.dll"

should be

if bit == "64bit":
    # if 64bit version of python, load AutoItX3_x64.dll
    dll = "AutoItX3_x64.dll"

That will at least get the package to import properly. When I tried the simple script in the PyAutoIt README on my 64-bit Python 2.7, the control_click() failed, but that's a separate issue.

jacexh commented 9 years ago

I merged this patch, thank you for your feedback.

kotofos commented 8 years ago

Can you please also update pypi package?

jacexh commented 8 years ago

@kotofos try this: pip install -U https://github.com/jacexh/pyautoit/archive/master.zip

sahan80 commented 7 years ago

hi, I have used pip install -U https://github.com/jacexh/pyautoit/archive/master.zip it installed successfully. But when I am trying to import pyautoit in IDLE it throwing an exception like

Traceback (most recent call last): File "<pyshell#0>", line 1, in import pyautoit ImportError: No module named 'pyautoit'

please help...

jacexh commented 7 years ago

@sahan80 the package name is autoit

sahan80 commented 7 years ago

oh sorry for that, it is working fine now with autoit

dsenkyrova commented 7 years ago

Hi guys I am trying to install on linux but I get the following error

/usr/bin/pip run on Tue May 30 06:26:28 2017 Downloading/unpacking pyautoit Getting page https://pypi.python.org/simple/pyautoit/ URLs to search for versions for pyautoit:

ValueError: type 'v' not supported


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-fa7FzT/pyautoit Exception information: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 298, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/site-packages/pip/req.py", line 1234, in prepare_files req_to_install.run_egg_info() File "/usr/lib/python2.7/site-packages/pip/req.py", line 325, in run_egg_info command_desc='python setup.py egg_info') File "/usr/lib/python2.7/site-packages/pip/util.py", line 698, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-fa7FzT/pyautoit

dmwyatt commented 7 years ago

@dsenkyrova AutoIT is Windows-only, so this library will not work on Linux.

balup34 commented 7 years ago

+1

On Sun, Aug 6, 2017 at 12:19 AM, Dustin Wyatt notifications@github.com wrote:

@dsenkyrova https://github.com/dsenkyrova AutoIT is Windows-only, so this library will not work on Linux.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jacexh/pyautoit/issues/4#issuecomment-320463295, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUAefOE1Fao-lJq17PlgojmgX5Qx_4Zks5sVLk6gaJpZM4DkYz9 .

Vinodkumar545 commented 6 years ago

Hi,

what is the alternative package/tool for linux? Clearly, pyautoit only works for windows. What about linux user??

Could you please provide some suggestions here.

Vinod

stuaxo commented 5 years ago

Hi, Just another confirmation that installing from git with pip works, any chance of this making it into a release and onto pypi?

S

kyc1109 commented 5 years ago

I also have the same problem in win10 64bit. I remove AutoItX3.dll (win32) and then rename from AutoItX3_x64.dll (64 version) to AutoItX3.dll. then re-install again, is work. But not sure have any risk.