Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 907
Snerd Avatar asked May 27 '13 08:05

Snerd


People also ask

How do I upgrade my Python version?

1. In your browser, navigate to the Python Releases for macOS page, on Python's official website. 2. Click the link to download the latest Python 3 release on your computer.

How do I update pip to latest version of Python?

Updating Pip b is available.” You can run “pip install --upgrade pip” to install and use the new version of pip. To update pip2 or pip3 using this command, only replace the first pip with the pip version.


2 Answers

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.

like image 156
Zeugma Avatar answered Oct 03 '22 01:10

Zeugma


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.

like image 24
Shobhit Srivastava Avatar answered Oct 03 '22 00:10

Shobhit Srivastava