小编Ema*_*ber的帖子

在 Github Actions 上安装后找不到我的 python 模块

当我在本地环境中安装我的示例模块时,python 能够在导入模块时找到它。然而,当由 Github Actions 执行时,工作流失败并且报告的错误是我的模块 (ci-test) 未安装。

main.yaml:

  - name: Install ci-test package
    run: |
      python setup.py build
      python setup.py install 
      python -c "import ci_test"
Run Code Online (Sandbox Code Playgroud)

完整的 yaml 文件位于此处。Github Actions 的错误输出是:

Installed /home/runner/.local/lib/python3.7/site-packages/ci_test-0.0.1-py3.7.egg
Processing dependencies for ci-test==0.0.1
Finished processing dependencies for ci-test==0.0.1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ci_test'
Error: Process completed with exit code 1.
Run Code Online (Sandbox Code Playgroud)

python github-actions

3
推荐指数
1
解决办法
1373
查看次数

标签 统计

github-actions ×1

python ×1