0

I'm running Django REST API on GCP on Ubuntu 20.04 .I have created a virtual environment for my project. When I run pip3 python3.8 manage.py on my project path I'm getting the following error.

python3.8 manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/home/earthling/myEnv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/config.py", line 228, in create
    import_module(entry)
  File "/usr/lib/python3.8/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 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'scheduler'

Result of the pip list

asgiref 3.5.2
async-timeout 4.0.2
backports.zoneinfo 0.2.1
certifi 2022.5.18.1 chardet 3.0.4
Click 7.0
colorama 0.4.4
colorlog 4.0.2
cursor 1.3.4
cycler 0.11.0
Deprecated 1.2.13
Django 4.0.4
django-appconf 1.0.5
django-cacheops 6.0
django-cuser 2017.3.16
django-imagekit 4.1.0
django-media-fixtures 1.0.0
django-nose 1.4.7
django-ordered-model 3.5
django-redis 5.2.0
django-replicated 2.7
django-rq 2.5.1
django-storages 1.12.3
django-tinymce 3.4.0
djangorestframework 3.13.1
fonttools 4.33.3
funcy 1.17
halo 0.0.28
icalendar 4.0.9
idna 2.8
kiwisolver 1.4.2
log-symbols 0.0.14
matplotlib 3.5.2
modeltranslation 0.25
nose 1.3.7
numpy 1.22.4
packaging 21.3
pandas 1.4.2
pilkit 2.0
Pillow 9.1.1
pip 20.0.2
pkg-resources 0.0.0
pyparsing 3.0.9
python-dateutil 2.8.2
python-dotenv 0.20.0
pytz 2022.1
pytz-deprecation-shim 0.1.0.post0 redis 4.3.1
requests 2.22.0
rq 1.10.1
scipy 1.8.1
sentry-sdk 1.5.12
setuptools 44.0.0
six 1.16.0
spinners 0.0.24
sqlparse 0.4.2
termcolor 1.1.0
tzdata 2022.1
tzlocal 4.2
urllib3 1.25.11
wheel 0.34.2
wrapt 1.14.1

Help appreciated.

Earthling
  • 83
  • 3
  • 13

1 Answers1

0

You can try this:

python3.8 -m pip install APScheduler
Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
Metalgear
  • 3,391
  • 1
  • 7
  • 16
  • Tried the above David. Still getting the same error. I've also updated the question by adding pip list of packages installed. – Earthling May 25 '22 at 17:48
  • could you please try again? – Metalgear May 25 '22 at 17:56
  • Yup david. tried again. the package installed successfully, however on running migrate.py I get the same error. – Earthling May 25 '22 at 18:01
  • Any workaround for this ? – Earthling May 26 '22 at 03:55
  • I downgraded to python 3.8 and error isnt there now. I have only this 1 error now - I would be grateful if you could help.https://stackoverflow.com/questions/72350297/magicexception-file-5-39-supports-only-version-16-magic-file-magic-mgc-is-ver – Earthling May 27 '22 at 06:42