Reputation: 21
I am creating a Django project and attempting to setup Auth0 integrations. Per Auth0's documentation, I installed the social-auth-app-django
library which then went and also installed social-auth-core
. So please note that both these libraries are installed.
Here is my py -m pip list
output proving such:
Package Version
---------------------- ---------
asgiref 3.4.1
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.7
colorama 0.4.4
cryptography 35.0.0
defusedxml 0.7.1
Django 3.2.9
ecdsa 0.17.0
idna 3.3
oauthlib 3.1.1
pip 21.3.1
pyasn1 0.4.8
pycparser 2.21
PyJWT 2.3.0
python-dotenv 0.19.2
python-jose 3.3.0
python-social-auth 0.3.6
python3-openid 3.2.0
pytz 2021.3
requests 2.26.0
requests-oauthlib 1.3.0
rsa 4.7.2
setuptools 57.4.0
six 1.16.0
social-auth-app-django 5.0.0
social-auth-core 4.1.0
sqlparse 0.4.2
urllib3 1.26.7
As you can see, I'm running Django 3.2.9. I am also using Python 3.10.
After following all of Auth0's steps, I went to run py manage.py migrate
and receive the following ending error message:
ModuleNotFoundError: No module named 'social_django'
I have tried uninstalling and reinstalling the social-auth-app-django
and social-auth-core
libraries multiple times. I have also tried installing the libraries individually instead of just installing social-auth-app-django
. I have also tried installing social-auth-app[django]
(using brackets). Nothing has worked.
Every post I can find online is telling the OP to install the social-auth-app-django
library and that should fix their problem. But as demonstrated, I believe I've already done that. So unless there's a different way I need to install the library, I need a different solution.
Any and all help would be greatly appreciated. Thank you!
Upvotes: 2
Views: 2637
Reputation: 21
Huge credit to @furas in the comments helping point me in the right direction.
The Solution: Reinitialize the virtual environment using python 3.10 instead of python 3.8 and reinstall necessary packages.
Explanation: The problem was that I had inadvertently created my venv using python 3.8. So even though I'd run py -m pip list
successfully while inside of the 3.8 venv, all of my packages were still installed using python 3.8. So when I'd try and migrate using python 3.10, the packages weren't viewable.
Upvotes: 0