GameAISDK icon indicating copy to clipboard operation
GameAISDK copied to clipboard

感谢开源,Windows下执行requirements.txt安装依赖环境会报错

Open admingameres opened this issue 4 years ago • 8 comments

依赖环境通过pip安装,如opencv-python和tensorflow这些会提示找不到对应版本,安装其他版本后会提示需要其他附带组件的对应版本,在这完成之后,执行会报错,如下: Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed. Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed. Using legacy 'setup.py install' for pyzmq, since package 'wheel' is not installed. Installing collected packages: cffi, chardet, gast, grpcio, numpy, h5py, idna, Markdown, msgpack, msgpack-numpy, opencv-python, protobuf, psutil, pyzmq, urllib3, requests, wheel, Werkzeug, oauthlib, requests-oauthlib, pyasn1, rsa, pyasn1-modules, cachetools, google-auth, google-auth-oauthlib, tensorboard, opt-einsum, wrapt, google-pasta, termcolor, scipy, astunparse, tensorflow-estimator, keras-preprocessing, tensorflow, zmq Running setup.py install for cffi ... error ERROR: Command errored out with exit status 1: command: 'c:\users\lm\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lm\AppData\Local\Temp\pip-install-us63pxs_\cffi\setup.py'"'"'; file='"'"'C:\Users\lm\AppData\Local\Temp\pip-install-us63pxs_\cffi\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\lm\AppData\Local\Temp\pip-record-yih5nfmq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lm\appdata\local\programs\python\python38\Include\cffi' cwd: C:\Users\lm\AppData\Local\Temp\pip-install-us63pxs_\cffi
Complete output (37 lines): configtest.c running install running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\cffi copying cffi\api.py -> build\lib.win-amd64-3.8\cffi copying cffi\backend_ctypes.py -> build\lib.win-amd64-3.8\cffi copying cffi\cffi_opcode.py -> build\lib.win-amd64-3.8\cffi copying cffi\commontypes.py -> build\lib.win-amd64-3.8\cffi copying cffi\cparser.py -> build\lib.win-amd64-3.8\cffi copying cffi\error.py -> build\lib.win-amd64-3.8\cffi copying cffi\ffiplatform.py -> build\lib.win-amd64-3.8\cffi copying cffi\lock.py -> build\lib.win-amd64-3.8\cffi copying cffi\model.py -> build\lib.win-amd64-3.8\cffi copying cffi\pkgconfig.py -> build\lib.win-amd64-3.8\cffi copying cffi\recompiler.py -> build\lib.win-amd64-3.8\cffi copying cffi\setuptools_ext.py -> build\lib.win-amd64-3.8\cffi copying cffi\vengine_cpy.py -> build\lib.win-amd64-3.8\cffi copying cffi\vengine_gen.py -> build\lib.win-amd64-3.8\cffi copying cffi\verifier.py -> build\lib.win-amd64-3.8\cffi copying cffi_init.py -> build\lib.win-amd64-3.8\cffi copying cffi_cffi_include.h -> build\lib.win-amd64-3.8\cffi copying cffi\parse_c_type.h -> build\lib.win-amd64-3.8\cffi copying cffi_embedding.h -> build\lib.win-amd64-3.8\cffi copying cffi_cffi_errors.h -> build\lib.win-amd64-3.8\cffi running build_ext building '_cffi_backend' extension creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release creating build\temp.win-amd64-3.8\Release\c creating build\temp.win-amd64-3.8\Release\c\libffi_msvc C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic/libffi_msvc -Ic:\users\lm\appdata\local\programs\python\python38\include -Ic:\users\lm\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" /Tcc/_cffi_backend.c /Fobuild\temp.win-amd64-3.8\Release\c/cffi_backend.obj cffi_backend.c c:\users\lm\appdata\local\programs\python\python38\include\pyconfig.h(59): fatal error C1083: 无法打开包括文件: “io.h”: No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\lm\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lm\AppData\Local\Temp\pip-install-us63pxs\cffi\setup.py'"'"'; file='"'"'C:\Users\lm\AppData\Local\Temp\pip-install-us63pxs\cffi\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\lm\AppData\Local\Temp\pip-record-yih5nfmq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lm\appdata\local\programs\python\python38\Include\cffi' Check the logs for full command output.

admingameres avatar Aug 22 '20 04:08 admingameres

建议使用python3.6,高版本的python有些依赖包不存在。

sinshen avatar Aug 24 '20 05:08 sinshen

今天改用ubuntu安装,CPU编译,在拉起phone_aiclient时报错了,目前折腾两天还是没有跑起demo,感受到知识匮乏,还是难以解决遇到的问题。 machine:/usr/bin/GameAISDK-master/bin# ./start_ai.sh Run AI Service root 2750 2748 40 15:06 pts/17 00:00:00 python3 manage_center.py --runType=AI root 2760 2748 34 15:06 pts/17 00:00:00 python3 io_service.py root 2775 2748 15 15:06 pts/17 00:00:01 python3 agentai.py root 2807 2748 41 15:06 pts/17 00:00:00 ./GameReg

machine:/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16# python3 demo.py [2020-08-24 15:08:13,073][MainThread][state_notify.py:89][INFO] : state plugin, module_path:state_notify.state_notify, package:<module 'state_notify' from '/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/aiclient/plugin/state_notify/init.pyc'>, module_name:<module 'state_notify.state_notify' from '/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/aiclient/plugin/state_notify/state_notify.pyc'>, class_name:<class 'state_notify.state_notify.StateNotify'> [2020-08-24 15:08:13,074][MainThread][zmq_client_communication.py:30][INFO] : para_data in zmq:{'key': '0', 'recv_pattern': 5, 'send_pattern': 5, 'frame_decode_type': 2, 'comm_type': 1, 'save_last_action': 0, 'max_send_interval': 0.1, 'ip': '127.0.0.1', 'port1': 8898, 'max_none_frame_time': 30.0, 'max_none_action_time': 20.0, 'service': 1, 'use_env_variable': 0, 'process_speed_test': 1, 'port2': 8899} [2020-08-24 15:08:13,074][MainThread][zmq_client_communication.py:71][INFO] : use test_id: 0 [2020-08-24 15:08:13,076][MainThread][device_api.py:134][INFO] : device_type: Android, platform: Local [2020-08-24 15:08:13,083][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py:28][INFO] : platform: Local [2020-08-24 15:08:13,309][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py:34][INFO] : get platform class succeed ['/usr/bin/adb devices'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.product.cpu.abi'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.build.version.sdk'] ['/usr/bin/adb -s 1d1ccb36 push /usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/../touchserver/binary/arm64-v8a/touchserver /data/local/tmp'] b'' b'734 KB/s (1568280 bytes in 2.084s)\n' ['/usr/bin/adb -s 1d1ccb36 shell chmod 0755 /data/local/tmp/touchserver'] b'' b'' ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.product.cpu.abi'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.build.version.sdk'] [2020-08-24 15:08:19,041][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDevice.py:78][ERROR] : cloudscreen.so is not exsit Traceback (most recent call last): File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDevice.py", line 52, in initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDeviceAPI.py", line 26, in Initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py", line 36, in Initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/PlatformWeTest.py", line 74, in init File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 116, in setup File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 72, in __install_cloudscreen_server File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 58, in __install_cloudscreen_server FileNotFoundError: cloudscreen.so is not exsit [2020-08-24 15:08:19,043][MainThread][device_api.py:164][ERROR] : device api initializes failed: cloudscreen.so is not exsit [2020-08-24 15:08:19,043][MainThread][start_service.py:36][ERROR] : get device instance failed [2020-08-24 15:08:19,044][MainThread][state_notify.py:46][DEBUG] : encounter exception, exception_type: 6, err: cloudscreen.so is not exsit [2020-08-24 15:08:19,045][MainThread][state_notify.py:202][ERROR] : call on_exception notify error, exception_type:6, description: cloudscreen.so is not exsit [2020-08-24 15:08:19,045][MainThread][start_service.py:42][INFO] : main thread terminating...... [2020-08-24 15:08:19,045][MainThread][state_notify.py:34][DEBUG] : call on on_service_over [2020-08-24 15:08:19,046][MainThread][state_notify.py:156][DEBUG] : call on_service_over successfully [2020-08-24 15:08:19,046][MainThread][start_service.py:69][INFO] : finish over, success [2020-08-24 15:08:19,046][MainThread][start_service.py:70][INFO] : It needs few seconds to quit, please wait.

对了,之前提示是在 \tools\AIClient_ubuntu16\WrappedDeviceAPI\deviceAPI\mobileDevice\android 目录下找不到platformdefult\adb, 我把\tools\SDKTool\libs\WrappedDeviceAPI中的platformdefult文件夹复制到了\AIClient_ubuntu16\WrappedDeviceAPI\deviceAPI\mobileDevice\android下面,之后运行的。

admingameres avatar Aug 24 '20 07:08 admingameres

今天改用ubuntu安装,CPU编译,在拉起phone_aiclient时报错了,目前折腾两天还是没有跑起demo,感受到知识匮乏,还是难以解决遇到的问题。

machine:/usr/bin/GameAISDK-master/bin# ./start_ai.sh Run AI Service root 2750 2748 40 15:06 pts/17 00:00:00 python3 manage_center.py --runType=AI root 2760 2748 34 15:06 pts/17 00:00:00 python3 io_service.py root 2775 2748 15 15:06 pts/17 00:00:01 python3 agentai.py root 2807 2748 41 15:06 pts/17 00:00:00 ./GameReg machine:/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16# python3 demo.py [2020-08-24 15:08:13,073][MainThread][state_notify.py:89][INFO] : state plugin, module_path:state_notify.state_notify, package:<module 'state_notify' from '/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/aiclient/plugin/state_notify/init.pyc'>, module_name:<module 'state_notify.state_notify' from '/usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/aiclient/plugin/state_notify/state_notify.pyc'>, class_name:<class 'state_notify.state_notify.StateNotify'> [2020-08-24 15:08:13,074][MainThread][zmq_client_communication.py:30][INFO] : para_data in zmq:{'key': '0', 'recv_pattern': 5, 'send_pattern': 5, 'frame_decode_type': 2, 'comm_type': 1, 'save_last_action': 0, 'max_send_interval': 0.1, 'ip': '127.0.0.1', 'port1': 8898, 'max_none_frame_time': 30.0, 'max_none_action_time': 20.0, 'service': 1, 'use_env_variable': 0, 'process_speed_test': 1, 'port2': 8899} [2020-08-24 15:08:13,074][MainThread][zmq_client_communication.py:71][INFO] : use test_id: 0 [2020-08-24 15:08:13,076][MainThread][device_api.py:134][INFO] : device_type: Android, platform: Local [2020-08-24 15:08:13,083][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py:28][INFO] : platform: Local [2020-08-24 15:08:13,309][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py:34][INFO] : get platform class succeed ['/usr/bin/adb devices'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.product.cpu.abi'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.build.version.sdk'] ['/usr/bin/adb -s 1d1ccb36 push /usr/bin/GameAISDK-master/tools/AIClient_ubuntu16/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/../touchserver/binary/arm64-v8a/touchserver /data/local/tmp'] b'' b'734 KB/s (1568280 bytes in 2.084s)\n' ['/usr/bin/adb -s 1d1ccb36 shell chmod 0755 /data/local/tmp/touchserver'] b'' b'' ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.product.cpu.abi'] ['/usr/bin/adb -s 1d1ccb36 shell getprop ro.build.version.sdk'] [2020-08-24 15:08:19,041][phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDevice.py:78][ERROR] : cloudscreen.so is not exsit Traceback (most recent call last): File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDevice.py", line 52, in initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/androidDeviceAPI.py", line 26, in Initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/devicePlatform/WrappedPlatform.py", line 36, in Initialize File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/PlatformWeTest.py", line 74, in init File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 116, in setup File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 72, in __install_cloudscreen_server File "phone_aiclientapi/WrappedDeviceAPI/deviceAPI/mobileDevice/android/plugin/Platform_plugin/PlatformWeTest/demo/Initializer.py", line 58, in __install_cloudscreen_server FileNotFoundError: cloudscreen.so is not exsit [2020-08-24 15:08:19,043][MainThread][device_api.py:164][ERROR] : device api initializes failed: cloudscreen.so is not exsit [2020-08-24 15:08:19,043][MainThread][start_service.py:36][ERROR] : get device instance failed [2020-08-24 15:08:19,044][MainThread][state_notify.py:46][DEBUG] : encounter exception, exception_type: 6, err: cloudscreen.so is not exsit [2020-08-24 15:08:19,045][MainThread][state_notify.py:202][ERROR] : call on_exception notify error, exception_type:6, description: cloudscreen.so is not exsit [2020-08-24 15:08:19,045][MainThread][start_service.py:42][INFO] : main thread terminating...... [2020-08-24 15:08:19,045][MainThread][state_notify.py:34][DEBUG] : call on on_service_over [2020-08-24 15:08:19,046][MainThread][state_notify.py:156][DEBUG] : call on_service_over successfully [2020-08-24 15:08:19,046][MainThread][start_service.py:69][INFO] : finish over, success [2020-08-24 15:08:19,046][MainThread][start_service.py:70][INFO] : It needs few seconds to quit, please wait.

对了,之前提示是在 \tools\AIClient_ubuntu16\WrappedDeviceAPI\deviceAPI\mobileDevice\android 目录下找不到platformdefult\adb, 我把\tools\SDKTool\libs\WrappedDeviceAPI中的platformdefult文件夹复制到了\AIClient_ubuntu16\WrappedDeviceAPI\deviceAPI\mobileDevice\android下面,之后运行的。

请问,你运行demo时的手机机型和安卓版本是多少?

sinshen avatar Aug 24 '20 12:08 sinshen

手机型号:OPPO Reno Ace(PCLM10),Android10的版本。

admingameres avatar Aug 25 '20 02:08 admingameres

手机型号:OPPO Reno Ace(PCLM10),Android10的版本。

目前对AI Client对安卓10系统还不支持,后续我们支持下。

sinshen avatar Aug 25 '20 06:08 sinshen

手机型号:OPPO Reno Ace(PCLM10),Android10的版本。

目前对AI Client对安卓10系统还不支持,后续我们支持下。

先谢了,今年买的手机大多是Android10,所以还没有机会用低版本手机尝试Demo,挺遗憾

admingameres avatar Aug 27 '20 09:08 admingameres

手机驱动模块已升级支持android10,可以在QQ技术群里面下载,开源版本最新也会更新升级。

dijinzhou avatar Oct 10 '20 02:10 dijinzhou

建议使用python3.6,高版本的python有些依赖包不存在。

ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。这个也是因为版本原因吗,我的3.6.5

shineway14 avatar Oct 18 '21 12:10 shineway14