I guess using a conda environment is the issue. Created a virtual environment instead with the same version of libraries and the error goes away.