[python] upgade python version using pip

So I have python 2.7.3 installed on Windows 7 64 bit and I want to do an incremental upgrade to version 2.7.5. I have pip installed and it works fine; I just installed Django using it.

I ran into this command: pip install --upgrade 'python>=2.7,<2.7.99'

Now it forces pip to download the latest version that is not Python 3 which is what I want. 2.7.5 starts downloading and I get the following error:

    Downloading/unpacking python>=2.7,<2.7.99
      Downloading Python-2.7.5.tar.bz2 (12.1MB): 12.1MB downloaded
      Running setup.py egg_info for package python
        Traceback (most recent call last):
          File "<string>", line 16, in <module>
          File "c:\users\name\appdata\local\temp\pip-build-name\python\setup.py", line 33, in <module>
            COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
        TypeError: argument of type 'NoneType' is not iterable
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):

      File "<string>", line 16, in <module>

      File "c:\users\name\appdata\local\temp\pip-build-name\python\setup.py", line 33, in <module>

        COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))

    TypeError: argument of type 'NoneType' is not iterable

    ----------------------------------------
    Command python setup.py egg_info failed with error code 1 in c:\users\name\appdata\local\temp\pip-build-name\python

Also I am new to pip. When I cancel a download is that safe? I typed install "pip install python" and it started downloading version python version 3. So I cancelled. That won't override my main python 2.7.3 install?

Curious.

This question is related to python upgrade pip

The answer is


pip is designed to upgrade python packages and not to upgrade python itself. pip shouldn't try to upgrade python when you ask it to do so.

Don't type pip install python but use an installer instead.


Basically, pip comes with python itself.Therefore it carries no meaning for using pip itself to install or upgrade python. Thus,try to install python through installer itself,visit the site "https://www.python.org/downloads/" for more help. Thank you.


Examples related to python

programming a servo thru a barometer Is there a way to view two blocks of code from the same file simultaneously in Sublime Text? python variable NameError Why my regexp for hyphenated words doesn't work? Comparing a variable with a string python not working when redirecting from bash script is it possible to add colors to python output? Get Public URL for File - Google Cloud Storage - App Engine (Python) Real time face detection OpenCV, Python xlrd.biffh.XLRDError: Excel xlsx file; not supported Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation

Examples related to upgrade

Problems after upgrading to Xcode 10: Build input file cannot be found Upgrading React version and it's dependencies by reading package.json Want to upgrade project from Angular v5 to Angular v6 Update TensorFlow Table 'performance_schema.session_variables' doesn't exist How to upgrade PostgreSQL from version 9.6 to version 10.1 without losing data? How to upgrade PowerShell version from 2.0 to 3.0 upgade python version using pip How do I update pip itself from inside my virtual environment? How to update Python?

Examples related to pip

How to fix error "ERROR: Command errored out with exit status 1: python." when trying to install django-heroku using pip "E: Unable to locate package python-pip" on Ubuntu 18.04 How to Install pip for python 3.7 on Ubuntu 18? What is the meaning of "Failed building wheel for X" in pip install? Could not install packages due to an EnvironmentError: [Errno 13] How do I install Python packages in Google's Colab? Conda version pip install -r requirements.txt --target ./lib pip: no module named _internal AttributeError: Module Pip has no attribute 'main' Error after upgrading pip: cannot import name 'main'