【发布时间】:2021-09-02 17:21:21
【问题描述】:
我在 vagrant 上使用 ubuntu/focal64,并试图让 bazel 工具链为开发工作。
我在我的团队存储库中执行了 pip3 install -r requirements.txt,它似乎已经成功安装了所有要求。但是我随后在某个目标上运行bazel build /path/to/target:run,并得到以下输出:
... <More Packages Loaded here> ...
Collecting torch==1.7.1
(Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/vagrant/.cache/bazel/_bazel_vagrant/f9910d98673307a31f928c448bd4acd0/external/rules_python/python/pip_install/extract_wheels/__main__.py", line 5, in <module>
main()
File "/home/vagrant/.cache/bazel/_bazel_vagrant/f9910d98673307a31f928c448bd4acd0/external/rules_python/python/pip_install/extract_wheels/__init__.py", line 87, in main
subprocess.run(pip_args, check=True)
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/vagrant/venv/bin/python3', '-m', 'pip', '--isolated', 'wheel', '-r', '/home/vagrant/tech-backends/requirements.txt']' died with <Signals.SIGKILL: 9>.
)
WARNING: Target pattern parsing failed.
ERROR: no such package '@pip_deps//': rules_python_external failed: Collecting gremlinpython==3.4.6
Using cached gremlinpython-3.4.6-py2.py3-none-any.whl (61 kB)
Collecting aenum==2.2.3
Using cached aenum-2.2.3-py3-none-any.whl (40 kB)
... <More Packages Loaded here> ...
这个相同的模式重复了大约 4 次(因为在完全相同的位置有一个错误),然后最终显示一个 FAILED: Build did NOT complete successfully (0 packages loaded)。
对这里发生的事情有任何想法吗? “火炬”有问题吗? (因为它每次都死在那里)。注意 - 我认为“gremlinpython==3.4.6”没有问题,我认为“rules_python_external_failed:...”行缺少换行符。
后续:我直接跑了python3 -m pip --isolated wheel torch==1.7.1,结果被杀了:
Collecting torch==1.7.1
Killed
但是,pip3 install torch==1.7.1 工作正常。不知道这里发生了什么。
【问题讨论】:
标签: python python-3.x pip pytorch