繁体   English   中英

使用easy_install升级Python Sphinx

[英]Upgrade Python Sphinx with easy_install

我正在使用Portable Python 2.7.6.1,并安装了Sphinx 1.5.1以创建手册。 由于Sphinx在过去的几个月中已经取得了很大的进步,因此我试图更新到最新版本的Sphinx 1.6.5,但是我无法使用easy_install工具进行升级。

我试过了:

easy_install-2.7.exe -U sphinx

它说:

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

之后,我尝试强制使用该版本,但这也失败了:

easy_install-2.7.exe -m 1.6.5 sphinx

这就是说的:

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

我在这里做错了什么? 也许删除狮身人面像会有所帮助,但似乎在easy-install为此的命令开关。

easy_install的文档非常简单。 请参阅升级软件包

您无需执行任何特殊操作即可升级软件包:只需通过请求特定版本即可安装新版本,例如:

 easy_install "SomePackage==2.0" 

因此,应该这样做:

easy_install "Sphinx==1.6.5"

另请参阅使用easy_install 卸载软件包

如果要删除软件包的当前安装版本(或软件包的所有版本),则应首先运行:

 easy_install -m PackageName 

这样可以确保Python不会继续搜索您打算删除的软件包。 完成此操作后,您可以安全地删除.egg文件或目录以及要删除的所有脚本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM