Reputation: 826
I had already installed python 3.8.2 in my MX linux-19. But when i try to install django-heroku in pycharm it said
ERROR: Package 'whitenoise' requires a different Python: 2.7.16 not in '>=3.5, <4
then i install python 2.7.16 but not uninstall the previous latest one. After installing it, It again occurs the same error. What should i do now?
FULL LOG
$ pip install django-heroku
Error
> DEPRECATION: Python 2.7 reached the end of its life on January 1st,
> 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7.
> More details about Python 2 support in pip, can be found at
> https://pip.pypa.io/en/latest/development/release-process/#python-2-support
> Defaulting to user installation because normal site-packages is not
> writeable Collecting django-heroku Using cached
> django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB) Collecting psycopg2
> Using cached psycopg2-2.8.4.tar.gz (377 kB) Collecting whitenoise
> Using cached whitenoise-5.0.1-py2.py3-none-any.whl (20 kB) ERROR:
> Package 'whitenoise' requires a different Python: 2.7.16 not in
> '>=3.5, <4'
Upvotes: 2
Views: 2070
Reputation: 31
Use this it works for me!!
python -m pip install django-heroku
Upvotes: 1
Reputation: 960
Probably pycharm is pointing to the wrong python interpreter version. You might need to configure it yourself.
File -> Settings -> Project: <project-name> -> Project Interpreter -> Click on the gear -> Add -> System Interpreter -> Select the correct python version -> OK
Check Pycharm docs for this case in particular.
Upvotes: 2