pip 1.5+ 出於安全考量,預設封鎖非 PyPI 託管的套件(如 pylint 依賴 astroid 托管於 pylint.org)。嘗試安裝會報 Could not find any downloads that satisfy the requirement 與 Some insecure and unverifiable files were ignored。本文提供三種解決路徑。
> pip install pylint --allow-external pylint
Downloading/unpacking pylint
Downloading/unpacking astroid>=1.3.6 (from pylint)
Could not find any downloads that satisfy the requirement astroid>=1.3.6
Some insecure and unverifiable files were ignored (use --allow-unverified astroid to allow).
No distributions at all found for astroid>=1.3.6
pip install pip==1.4.1
pip install pylint
pip install pylint \
--allow-all-external \
--allow-unverified pylint \
--allow-unverified astroid \
astroid==1.3.6
--allow-all-external:允許所有外部來源--allow-unverified <pkg>:允許特定套件跳過驗證astroid==1.3.6),否則 pip 無法從外部索引解析相依性# requirements.txt
--allow-all-external pylint
--allow-unverified pylint
pylint
--allow-all-external astroid==1.3.6
--allow-unverified astroid
pip install -r requirements.txt
.whl 或 .tar.gz:PyPI pylintpip install pylint-2.17.7-py3-none-any.whlrequirements.txt 管理例外清單devpi、pypiserver)代理外部套件--allow-unverified,需改用 --index-url 指向私有源