简易安装是否正确处理相关链接?它生成的绝对链接与浏览器和其他工具不同

2024-05-19 18:19:42 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我试着用easy_install-2.5安装Aptus

sente@oslo:~$ easy_install-2.5 --install-dir=code/lib/ aptus
Searching for aptus
Reading http://pypi.python.org/simple/aptus/
Reading http://nedbatchelder.com/code/aptus
Best match: Aptus 2.0
Downloading http://nedbatchelder.com/code/aptus/code/aptus/Aptus-2.0.tar.gz
error: Can't download http://nedbatchelder.com/code/aptus/code/aptus/Aptus-2.0.tar.gz: 404 Not Found

http://nedbatchelder.com/code/aptus上的HTML具有:

<a href="code/aptus/Aptus-2.0.tar.gz">Aptus-2.0.tar.gz</a>

我所知道的应该是 http://nedbatchelder.com/code/aptus/code/aptus/Aptus-2.0.tar.gz…使安装更容易。你知道吗

不过,所有其他浏览器和命令行实用程序都将该链接转换为http://nedbatchelder.com/code/aptus/Aptus-2.0.tar.gz。你知道吗

我很好奇为什么easy\u install的行为与浏览器和命令行工具不同。你知道吗

我知道pip比easy\u intsall-2.5更受欢迎,但它不在这个旧系统上,目前我对easy\u安装更感兴趣。你知道吗

谢谢


Tags: install命令行comhttpeasy浏览器codetar
1条回答
网友
1楼 · 发布于 2024-05-19 18:19:42

通常情况下,你应该正确的解释这个网址。你知道吗

但是,该页有一个^{}标记,它更改了用于将相对URL转换为绝对URL的基:

<base href='http://nedbatchelder.com'>

我假设easy\u install只是不寻找base标记。你知道吗

相关问题 更多 >