最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Python pip - expressing trusted host in command line call - Stack Overflow

programmeradmin0浏览0评论

I'm attempting to fetch a dependency and install in user scope, during script execution:

# PYPI is a global settings dict

try:
    resp = subprocess.check_call(
        [
            sys.executable, "-m", "pip", "install",
            "--user", "--trusted-host",
            PYPI["trusted_host"], "-i", PYPI["pypi_url"],
            package_name
        ], text=True
    )

However, I receive:

no such option: --trusted-host

I am writing around Esri's ArcGIS python API, and fetching the optional package from a custom pypi endpoint. I'd like to avoid bothering end users with setting up pip.conf/pip.ini files, or create venvs or anything like that - so the question is:

How do I make a pip call to a custom host and force trust in one command line expression?

发布评论

评论列表(0)

  1. 暂无评论