ModuleNotFoundError: No module named 'paypal'

Viewed 2684

I'm using,

Python: 3.8, Django: 3.0, django-paypal: 1.0.0

I'm trying to implement a simple Payment Gateway using Django-Paypal lib.

And I'm getting this error during the migration.....

    (project-venv) PS J:\jaimin (E)\Programming Practice\Django\Payment Gateway using Paypal\simple_ecommerce\django_project> py -3 .\manage.py migrate
Traceback (most recent call last):
  File ".\manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\management\__init__.py", line 377, in execute
    django.setup()
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\apps\config.py", line 116, in create
    mod = import_module(mod_path)
  File "C:\Users\jaimi\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'paypal'

And here is my settings.py

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'ecommerce_app',
    'paypal.standard.ipn',  
]

What can I do Now?.....

2 Answers

it is happening because of circular import in init.py file follow the steps : don't install this ...maybe u have done it ...

pip uninstall paypal

no need to delete migrations unistall it and reinstall it properly

pip install django-paypal

don't forget to add " - " in that because this is the reason for that issue ... this worked for me ! try and give a upvote if works . Thank You in advance

You just need to install django-paypal.

pip install django-paypal
Related