当我try 在没有互联网连接的情况下运行tox时,它会打印以下错误消息:
py3 inst-nodeps: mypackage/.tox/.tmp/package/1/mypackage-0.1.1.dev0.tar.gz
ERROR: invocation failed (exit code 1), logfile: mypackage/.tox/py3/log/py3-12.log
=================================================================================== log start ===================================================================================
Processing ./.tox/.tmp/package/1/mypackage-0.1.1.dev0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb577c1dc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flit-core/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb577c1e50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flit-core/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb577c1b20>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flit-core/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb577c1760>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flit-core/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb5783fc10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flit-core/
ERROR: Could not find a version that satisfies the requirement flit_core<4,>=3.2 (from versions: none)
ERROR: No matching distribution found for flit_core<4,>=3.2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
==================================================================================== log end ====================================================================================
____________________________________________________________________________________ summary ____________________________________________________________________________________
ERROR: py3: InvocationError for command mypackage/.tox/py3/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/mypackage-0.1.1.dev0.tar.gz (exited with code 1)
我的毒物.ini看起来像这样:
[tox]
envlist = py3
isolated_build = True
[testenv]
deps =
mypy
pytest
types-appdirs
commands =
mypy src/mypackage tests
pytest
通过互联网连接运行tox的效果与预期一致.
我已经try 了this issue中给出的建议,在我的tox中添加以下几行.但是似乎没有任何效果,没有互联网连接我无法运行tox.
setenv = VIRTUALENV_DOWNLOAD=0
PIP_DISABLE_PIP_VERSION_CHECK=1
我正在使用tox 3.25.0和pip 20.3.4,我在两个不同的项目中try 了这一点,一个使用flit 3.7.1,另一个使用setuptools.
有人知道我如何在没有互联网连接的情况下运行tox吗?