Python Forum

Full Version: requirements file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
pip freeze > requirements.txt
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. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/developmen...-2-support pip 21.0 will remove support for this functionality.

This is the error I'm getting in my python shell when I try to create a requirements file? I'm on mac
This is not error, but Depreciation warning. And as it says - python 2 is dead, it reached end of life January 1st 2020. Unless you have really, really good reason (and being a newbie I doubt you do) you should be working with python 3. Latest stable version is 3.9
I have python 3.9 thats why I'm confused as to why I'm getting this error.
Being on macbook I guess you have both python2 and python3. Check which version you use. Not a mac user, but usually python command invoke python2, while python3 and pip3 command invoke python3 and pip for python3
Are you sure you don't have both? What happens if you try running pip3 instead? You can also run it with python, i.e. python -m pip (docs here).
(Nov-06-2020, 05:21 AM)tdwinfre Wrote: [ -> ]I have python 3.9 thats why I'm confused as to why I'm getting this error.
Read the link i posted in your other Thread .
The right and wrong way to set Python 3 as default on a Mac
You set alias to your python 3.9 version,default when type python it will point to 2.7(that comes with Mac).
I already have pip installed I was using that original code to build a virtual environment.
I went to the link I'm to trying figure out what to do I downloaded pip install some package. I'm just trying to understand.