Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
511 views
in Technique[技术] by (71.8m points)

upgrade - 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
ameappdatalocalemppip-build-namepythonsetup.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
ameappdatalocalemppip-build-namepythonsetup.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
ameappdatalocalemppip-build-namepython

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.

question from:https://stackoverflow.com/questions/16769109/upgade-python-version-using-pip

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...