I hope this helps . I have run into similar issue with importing libraries from jupyter notebook, and the problem has always been that I forgot to install jupyter in my new conda environment, but jupyter is installed in the root environment. Based on the error given, make sure you have jupyter installed within the py27 conda environment. If it not installed, it will default to open the one in the root environment.
source activate py27 # activate py27 if on windows
conda install jupyter
Can't import serializer from other serializer in django rest-framework?
By : Keisha Tsai
Date : March 29 2020, 07:55 AM
this one helps. As I have mentioned previously in a comment, I believe this happens due to circular (cyclic) imports in Python. This happens particularly when you are declaring related fields in models, and some models have not been instanced yet. In this case, when you execute your program, it tries to import LeadSerializer, that requires importing NoteSerializer, that requires importing LeadSerializer, that requires importing NoteSerializer... see where this is going?