0
votes

I have installed the chembl_webresource_client package.

Then I tried to import a module from the package:

from chembl_webresource_client.new_client import new_client

But it fails to execute and this error appears:

ImportError Traceback (most recent call last) in () 1 # Import necessary libraries 2 import pandas as pd ----> 3 from chembl_webresource_client.new_client import new_client

4 frames /usr/local/lib/python3.7/dist-packages/chembl_webresource_client/cache.py in () 1 author = 'mnowotka' 2 ----> 3 from requests_cache.backends.base import BaseCache, hashlib, _to_bytes 4 5 def create_key(self, request):

ImportError: cannot import name 'hashlib' from 'requests_cache.backends.base' (/usr/local/lib/python3.7/dist-packages/requests_cache/backends/base.py)

Is there a fix for this?

1

1 Answers

0
votes

I have faced the same issue today and resolved it by updating chembl-webresource-client library's version from 0.10.2 to 0.10.3 in my project's requirements.txt file.

For example: chembl-webresource-client==0.10.3

Also after making these changes and activating your project's virtual environment, please don't forget to fetch and re-install all listed libraries in your requirements.txt using the following command:

pip install -r .\requirements.txt