[英]ModuleNotFoundError: No module named 'requests.adapters' when using pyfcm
I'm trying to use pyfcm
library in my django project, by adding it to requiements.txt
but I noticed that it is getting an error that mainly comes because of trying to import from requests
library.. here is the error:我试图在我的 django 项目中使用pyfcm
库,方法是将它添加到requiements.txt
,但我注意到它出现错误,这主要是因为尝试从requests
库导入。这是错误:
rolla_django | from pyfcm import FCMNotification
rolla_django | File "/usr/local/lib/python3.10/dist-packages/pyfcm/__init__.py", line 14, in <module>
rolla_django | from .fcm import FCMNotification
rolla_django | File "/usr/local/lib/python3.10/dist-packages/pyfcm/fcm.py", line 1, in <module>
rolla_django | from .baseapi import BaseAPI
rolla_django | File "/usr/local/lib/python3.10/dist-packages/pyfcm/baseapi.py", line 6, in <module>
rolla_django | from requests.adapters import HTTPAdapter
rolla_django | ModuleNotFoundError: No module named 'requests.adapters'
and here is my requirements.txt
这是我的requirements.txt
Django~=4.1.1
djangorestframework~=3.13.1
django-extensions
pymysql~=1.0.2
requests
tzdata
psycopg2-binary
django-crontab
pyfcm
You can try these things你可以试试这些东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.