简体   繁体   中英

pyistaller - OSError: Cannot load AutoItX

I have python 3.7, pip 20.0.2, pyinstaller 3.6, windows 10. I have a problem with converting .py to .exe:

at first, I didnt used the autoit directory and managed to convert Python file to EXE file via the pyinstaller tool, and then run the EXE file.

Then, I added the autoit directory and installed it via PROJECT ITERPETER . The python code worked fine running through the PyCharm software IDE (green arrow in Pycharm) I executed the command "pyinstaller --onefile" on the .py file but as soon as I tried to run the EXE-file from dist folder I got a lot of errors in the console when the The common denominator of them all is that in the folder Temp the DLL file is unreadable "OSError: Cannot load AutoItX from path: C:\\Users\\Yagel\\AppData\\Local\\Temp\\_MEI108842\\autoit\\lib\\AutoItX3_x64.dll" .

I open this folder, and I found out that all the libraries I use in my code except of the autoit directory are installed. Of course, now inserting A folder will not help because (from my understanding) pyinstaller takes all these files and groups them to EXE . I was looking for a solution on a network(And particular in StackOverflow) that suggested adding the --paths c: \\ ... autoit command when I execute pyinstaller command - I added the command and the EXE again with the same errors (of course in a new folder within the TEMP because every run creates a folder there) and again within the folder was not the autoit. please help me to create the EXE file.

Apparently, the way I tried to combine selenium and autoit was wrong. The right way is to create an EXE file with the aotuit3 software and run the EXE I created from the script using os.system. The following site has a very detailed guide on how to incorporate it.

https://www.guru99.com/use-autoit-selenium.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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