我使用devpi作为我的专用pypi服务器。当我在一个提升的命令提示符中升级pip时,我注意到了一种以前从未见过的递归行为,简单地说,pip正在下载所有的pip到pip 1。
python -m pip install --upgrade pip
Looking in indexes: http://localhost:3141/packages/staging/
Requirement already satisfied: pip in c:\python39\lib\site-packages (20.3.2)
Collecting pip
Downloading http://localhost:3141/root/pypi/%2Bf/fab/098c8a1758295/pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB ...
Downloading http://localhost:3141/root/pypi/%2Bf/79c/1ac8a9dccbec8/pip-20.3.3.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Downloading http://localhost:3141/root/pypi/%2Bf/8d7/79b6a85770bc5/pip-20.3.2-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB ...
Downloading http://localhost:3141/root/pypi/%2Bf/aa1/516c1c8f6f634/pip-20.3.2.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Downloading http://localhost:3141/root/pypi/%2Bf/425/e79b20939abbf/pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Downloading http://localhost:3141/root/pypi/%2Bf/43f/7d3811f05db95/pip-20.3.1.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Downloading http://localhost:3141/root/pypi/%2Bf/323/6fe7288d155c2/pip-20.3-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB ...
Downloading http://localhost:3141/root/pypi/%2Bf/9ae/7ca6656eac22d/pip-20.3.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB ...
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Downloading http://localhost:3141/root/pypi/%2Bf/51f/1c7514530bd5c/pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 6.8 MB/s
Downloading http://localhost:3141/root/pypi/%2Bf/85c/99a857ea0fb0a/pip-20.2.4.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Installing build dependencies ... canceled
ERROR: Operation cancelled by user当我在非提升提示符pip中运行相同的命令时,它应该工作。
python -m pip install pip
Looking in indexes: http://localhost:3141/packages/staging/
Requirement already satisfied: pip in c:\python39\lib\site-packages (20.3.2)同样,递归地下载所有依赖项也有点奇怪。我认为,如果我有一个较旧的pip,则非高架提示符会抛出一个错误,因为pip没有安装在用户主目录中。
python -m pip list --path "c:\python39\lib\site-packages"
Package Version
---------- -------
pip 20.3.2
setuptools 50.3.2
vboxapi 1.0通过排除devpi,它肯定是pip,同样的行为。
python -m pip install --index-url https://pypi.org/simple --upgrade --no-cache-dir pipOk报告的这里
发布于 2020-12-30 17:53:22
实际上,它是由错误上的-U/--upgrade标志触发的。为了解决这个问题,我安装了pip20.3.3,提供了一个确切的版本。
python -m pip install 'pip==20.3.3'
Looking in indexes: http://localhost:3141/packages/staging/
Collecting pip==20.3.3
Downloading http://localhost:3141/root/pypi/%2Bf/fab/098c8a1758295/pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 6.4 MB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.3.2
Uninstalling pip-20.3.2:
Successfully uninstalled pip-20.3.2
Successfully installed pip-20.3.3现在看来已经解决了
python -m pip install --upgrade pip
Looking in indexes: http://localhost:3141/packages/staging/
Requirement already satisfied: pip in c:\python39\lib\site-packages (20.3.3)https://stackoverflow.com/questions/65509583
复制相似问题