[Fixed]-Python package recognized in Pycharm, not in terminal

1๐Ÿ‘

โœ…

If you are using Python 3, then you should be using python3 manage.py check. It might be better to use a virtual environment, in which case you would activate the virtual environment before running python manage.py check.

The import fails in the Python 3 shell because you have not set the DJANGO_SETTINGS_MODULE environment variable (see the docs for more info). The easiest fix is to use the Django shell, which takes care of this for you.

$ python3 manage.py shell
>>> import imagekit
๐Ÿ‘คAlasdair

Leave a comment