Search code examples
pythonpippython-sphinxeasy-install

Upgrade Python Sphinx with easy_install


I'm using Portable Python 2.7.6.1 and I installed Sphinx 1.5.1 in order to create my manuals. As Sphinx made already a lot of progress in the last months I was trying to update to the newest version Sphinx 1.6.5, but I was unable to upgrade using the easy_install Tool.

I tried:

easy_install-2.7.exe -U sphinx

And it says:

Searching for sphinx
Reading http://pypi.python.org/simple/sphinx/
Couldn't retrieve index page for 'sphinx'
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Best match: sphinx 1.5.1
Processing sphinx-1.5.1-py2.7.egg
sphinx 1.5.1 is already the active version in easy-install.pth

After that I was trying to force the version, but this also failed:

easy_install-2.7.exe -m 1.6.5 sphinx

This is what is says:

Searching for 1.6.5
Reading http://pypi.python.org/simple/1.6.5/
Couldn't find index page for '1.6.5' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for 1.6.5
Best match: None
Traceback (most recent call last):
  File "C:\Data\Frank\Programme\Portable Python 2.7.6.1\App\Scripts\easy_install-2.7-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install-2.7')()
  File "C:\Data\Frank\Programme\Portable Python 2.7.6.1\App\lib\site-packages\setuptools\command\easy_install.py", line 1712, in main
    with_ei_usage(lambda:
  File "C:\Data\Frank\Programme\Portable Python 2.7.6.1\App\lib\site-packages\setuptools\command\easy_install.py", line 1700, in with_ei_usage
    return f()

What I'm doing wrong here? Maybe removing sphinx would help, but there is seemingly no command switch in easy-install for that.


Solution

  • The documentation of easy_install is straightforward. See upgrading a package.

    You don’t need to do anything special to upgrade a package: just install the new version, either by requesting a specific version, e.g.:

    easy_install "SomePackage==2.0"
    

    So this should do it:

    easy_install "Sphinx==1.6.5"
    

    See also uninstalling packages with easy_install.

    If you want to delete the currently installed version of a package (or all versions of a package), you should first run:

    easy_install -m PackageName
    

    This will ensure that Python doesn’t continue to search for a package you’re planning to remove. After you’ve done this, you can safely delete the .egg files or directories, along with any scripts you wish to remove.