Agora-Python-QuickStart icon indicating copy to clipboard operation
Agora-Python-QuickStart copied to clipboard

AttributeError: module 'agorartc' has no attribute 'RtcEngineEventHandlerBase'

Open shitizenlism opened this issue 5 years ago • 4 comments

D:\proj\gitwork\intech\agora\examples\pyExamples 的目录

2021/01/16 10:21 <DIR> . 2021/01/16 10:21 <DIR> .. 2021/01/16 10:20 1,175,410 Agora-Python-QuickStart-master.zip 2020/12/24 15:53 <DIR> basic_one_to_one_video 2020/12/24 15:53 <DIR> face_recognition 2020/12/24 15:53 2,072 README.md 2020/12/24 15:53 2,127 Readme.zh.md 3 个文件 1,179,609 字节 4 个目录 106,686,967,808 可用字节

(agora) D:\proj\gitwork\intech\agora\examples\pyExamples>cd basic_one_to_one_video

(agora) D:\proj\gitwork\intech\agora\examples\pyExamples\basic_one_to_one_video>python one2one.py Traceback (most recent call last): File "one2one.py", line 15, in class MyRtcEngineEventHandler(agorartc.RtcEngineEventHandlerBase): AttributeError: module 'agorartc' has no attribute 'RtcEngineEventHandlerBase'

shitizenlism avatar Jan 16 '21 02:01 shitizenlism

(agora) D:\proj\gitwork\intech\agora\examples\pyExamples\basic_one_to_one_video>python one2one.py Traceback (most recent call last): File "one2one.py", line 5, in import agorartc File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc_init_.py", line 9, in from .agorartc import ( File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc\agorartc.py", line 13, in from . import _agorartc ImportError: DLL load failed while importing _agorartc: 找不到指定的模块。

shitizenlism avatar Jan 16 '21 03:01 shitizenlism

@shitizenlism For your second reported error:

(agora) D:\proj\gitwork\intech\agora\examples\pyExamples\basic_one_to_one_video>python one2one.py Traceback (most recent call last): File "one2one.py", line 5, in import agorartc File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc__init__.py", line 9, in from .agorartc import ( File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc\agorartc.py", line 13, in from . import _agorartc ImportError: DLL load failed while importing _agorartc: 找不到指定的模块。

It seems like you did not download the required SDK from Agora. You may refer to 2. Download the required SDK.

From your path D:\tools\python_tools\venv\agora\lib\site-packages\agorartc\agorartc.py, it reveals a piece of information that you choose to compile SDK by yourself, while we highly recommend you to install our package from PyPI using pip install agora-python-sdk.

For a further discussion on your first reported error, please offer me more information like your Python Version, OS Version, etc.

YiqingJackieHuang avatar Jan 18 '21 07:01 YiqingJackieHuang

(agora) D:>pip list Package Version


pip 20.3.3 PyQt5 5.15.2 PyQt5-sip 12.8.1 setuptools 47.1.0

(agora) D:> pip install agora-python-sdk ERROR: Could not find a version that satisfies the requirement agora-python-sdk ERROR: No matching distribution found for agora-python-sdk

(agora) D:>pip install agora-python-sdk ERROR: Could not find a version that satisfies the requirement agora-python-sdk ERROR: No matching distribution found for agora-python-sdk

(agora) D:>pip3 install agora-python-sdk ERROR: Could not find a version that satisfies the requirement agora-python-sdk ERROR: No matching distribution found for agora-python-sdk

(agora) D:>pip3 install agora-python-sdk ERROR: Could not find a version that satisfies the requirement agora-python-sdk ERROR: No matching distribution found for agora-python-sdk

(agora) D:>python -V Python 3.8.5

(agora) D:>

my host computer is win10.

Yiqing Huang [email protected] 于2021年1月18日周一 下午3:31写道:

@shitizenlism https://github.com/shitizenlism For your second reported error:

(agora) D:\proj\gitwork\intech\agora\examples\pyExamples\basic_one_to_one_video>python one2one.py Traceback (most recent call last): File "one2one.py", line 5, in import agorartc File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc__init__.py", line 9, in from .agorartc import ( File "D:\tools\python_tools\venv\agora\lib\site-packages\agorartc\agorartc.py", line 13, in from . import _agorartc ImportError: DLL load failed while importing _agorartc: 找不到指定的模块。

It seems like you did not download the required SDK from Agora. You may refer to 2. Download the required SDK https://github.com/AgoraIO-Community/Agora-Python-SDK#method-2-compile-sdk .

From your path D:\tools\python_tools\venv\agora\lib\site-packages\agorartc\agorartc.py, it reveals a piece of information that you choose to compile SDK by yourself, while we highly recommend you to install our package from PyPI using pip install agora-python-sdk.

For a further discussion on your first reported error, please offer me more information like your Python Version, OS Version, etc.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AgoraIO-Community/Agora-Python-QuickStart/issues/2#issuecomment-762046010, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARVLPJMJZ3Z4EMW7PUMIZA3S2PPVVANCNFSM4WE4DU6A .

shitizenlism avatar Jan 20 '21 16:01 shitizenlism

@shitizenlism

(agora) D:>pip3 install agora-python-sdk ERROR: Could not find a version that satisfies the requirement agora-python-sdk ERROR: No matching distribution found for agora-python-sdk

For this piece of information, it seems like your OS is a 32-bit OS because currently, we have not uploaded a 32-bit distribution to PyPI. It can also explain why to raise an ImportError from your earlier reply.

Thus, by continuing on my last reply

It seems like you did not download the required SDK from Agora. You may refer to 2. Download the required SDK.

Please copy agora_rtc_sdk.dll and agora_rtc_sdk.lib files from libs/x86(32-bit) into repository root folder instead.

YiqingJackieHuang avatar Jan 21 '21 03:01 YiqingJackieHuang