django: ModuleNotFoundError: No module named '****'

1. ModuleNotFoundError: No module named 'corsheaders' (python3 environment)

pip3 install django-cors-headers

二、ModuleNotFoundError: No module named 'rest_framework'

pip3 install djangorestframework

三、ModuleNotFoundError: No module named 'oss2'

pip3 install oss2

四、ModuleNotFoundError: No module named 'rest_framework_jwt'

pip3 install djangorestframework-jwt

五、ModuleNotFoundError: No module named 'PIL'

pip3 install pillow

If it shows that it is already installed, uninstall it first and then install it. pip uninstall pillow

、ModuleNotFoundError: No module named 'alipay'

pip3 install python-alipay-sdk --upgrade

七、ModuleNotFoundError: No module named 'bs4'

 pip3 install beautifulsoup4

八、ModuleNotFoundError: No module named 'qrcode'

pip版本过低,需要升级,按照提示信息内容,执行cmd命令 
python -m pip install --upgrade pip
pip3 install prcode

 

References:

https://stackoverflow.com/questions/52585200/trouble-with-django-cors-header-modulenotfounderror-no-module-named-corshead

https://stackoverflow.com/questions/33308781/django-rest-framework-no-module-named-rest-framework

https://yq.aliyun.com/articles/667565

Guess you like

Origin blog.csdn.net/hard_days/article/details/100572552