61

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 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

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

3
  • Any limitation for you to not use the 2.7.5 windows installer from python.org ? Commented May 27, 2013 at 8:29
  • Good point. I kind of want to maximize the pip usage though. Commented May 27, 2013 at 8:32
  • 2
    Did I break anything by running "pip install python" while I had 2.7.3 already installed? Commented May 27, 2013 at 8:34

2 Answers 2

85

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.

Sign up to request clarification or add additional context in comments.

3 Comments

That clarified what I was thinking. I want to be clear if I broke anything regarding my previous question.
how to install python3 from command line on linux tho? "use an installer" why?
"use an installer" - How? what is the best practice?
9

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.