-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'event' #2
Comments
这个event是指我写的event.py,我之前用的是自己的python而非AirtestIDE自带的,也不知道为什么换个解释器就找不到路径了。2种解决方法: 话说如果只是使用脚本的话,根本不用AirtestIDE,直接用python运行就好了 |
方法1试试用管理员方式打开AirtestIDE |
根据那个issue使用方法2运行成功了,感谢大佬的回答(^_^) |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在Airtest中运行main.py时报错:
"D:\Tools\AirtestIDE\AirtestIDE" pyrunner "C:\Users\winds\Documents\Codes\HonkaiHelper\main.py"
[Start running..]
[16692] Failed to execute script AirtestIDE
Traceback (most recent call last):
File "AirtestIDE.py", line 82, in
File "AirtestIDE.py", line 58, in main
File "app\widgets\code_runner\tracer.py", line 72, in run_pyfile
File "C:\Users\winds\Documents\Codes\HonkaiHelper\main.py", line 11, in
from event import *
ModuleNotFoundError: No module named 'event'
[Finished]
然后在cmd中执行pip install event时报错:
C:\Users\winds\Documents\Codes\HonkaiHelper>pip install event
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting event
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d7/e9/3f88290f7a6add3e150b04d61cd989d07b0e5394c37f8bbc32d5a2ee263f/event-0.4.3.zip (56 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\winds\AppData\Local\Temp\pip-install-if_500t4\event_fed8eb9d9aba4ff3a2b89fec8b70b6e8\setup.py", line 20
print 'found libevent build directory', best
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('found libevent build directory', best)?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
请问要怎么解决呢?
The text was updated successfully, but these errors were encountered: