How to solve incompatibility between DeepPavlov, Tensorflow and Numpy in a Python script?

I am trying to run a script in Python 3.7 that makes use of DeepPavlov and Tensorflow==2.4.1.

It seems that there is an incompatibility, because:

  • DeepPavlov can work only with Numpy==1.18
  • Tensorflow==2.4.1 needs at least Numpy==1.19.2

If I downgrade Tensorflow, some of the instructions in the script fail, in particular I can not import transpose_shape.

I may try to change the script, and use different functions. However, I know for sure that this script has been successfully used by the person who gave it to me.

Is there a way around this apparent incompatibility?

Topic numpy python-3.x tensorflow library python

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.