-
Notifications
You must be signed in to change notification settings - Fork 75
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
No module named 'pycares._cares' #127
Comments
I suggest you to install pycares from source. You can run the following command: pip uninstall pycares # uninstall
pip install -v pycares --no-binary pycares # install from source |
Installing pycares from the source did not solve the issue...at least not for me. |
What's your full build log? I think it's like #78 . The default c-ares configure lack some functions and then cffi build failed. |
In the end I discovered this was due to wsgi not detecting the correct venv. Once I fixed this, the libraries worked fine. |
Please help me to solve this... |
Having this issue right now with my Flask app on AWS Lambda. @mdhaynes Could you please elaborate on how you've solved it? |
Just in case anyone else still has this issues I did managed to resolve it. It seems pycares depends on native .so c/c++ library . You have to include the version for lambda environment. I managed to do this creating lambda layer with all the dependencies for my lambda function. |
Running from a venv on unbuntu and flask, I have imported pycares alongside python 3.7
Previously 3.6.9 it worked fine.
Now I am getting an error:
File "/var/www/ctea/app/venv/lib/python3.7/site-packages/pydnsbl/checker.py", line 17, in
import aiodns
File "/var/www/ctea/app/venv/lib/python3.7/site-packages/aiodns/init.py", line 4, in
import pycares
File "/var/www/ctea/app/venv/lib/python3.7/site-packages/pycares/init.py", line 2, in
from ._cares import ffi as _ffi, lib as _lib
ModuleNotFoundError: No module named 'pycares._cares'
If I run python within the venv I can import pycares fine. The issue is when importing pycares from wsgi. I am not the only one with this issue:
constverum/ProxyBroker#124
constverum/ProxyBroker#157
Thanks in advance!
The text was updated successfully, but these errors were encountered: