I am using a python library that imports a deprecated library. One way to fix this is to change the library source to fix this error (e.g., import six
- see Python import error: cannot import name 'six' from 'sklearn.externals' ), but I don't want to do this because it means that I need to have a customized version of the library inside my project.
I would like to know if it is possible to set the PYTHONPATH, or add any line in my project to override the import used in the library.
from sklearn.externals import six
ImportError: cannot import name 'six' from 'sklearn.externals