gpt4 book ai didi

Github action fails for pandas package not found, even though installed dependencies(找不到PANAS包时,GitHub操作失败,即使已安装依赖项)

转载 作者:bug小助手 更新时间:2023-10-25 18:09:23 28 4
gpt4 key购买 nike



This is my workflow file publish.yml

这是我的工作流文件Publish.yml


name: Publish Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install -r requirements.txt
python -m pip install pandas
- name: Debug installed packages
run: |
python -m pip freeze
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

Every time I tried run actions, filed on Build packages step.

每次我尝试运行操作时,都会出现在构建程序包步骤中。


* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting build dependencies for sdist...
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 287, in get_requires_for_build_sdist
return hook(config_settings)
File "/tmp/build-env-fq0_u9yg/lib/python3.8/site-packages/setuptools/build_meta.py", line 358, in get_requires_for_build_sdist
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/build-env-fq0_u9yg/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/tmp/build-env-fq0_u9yg/lib/python3.8/site-packages/setuptools/build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/build-env-fq0_u9yg/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 2, in <module>
File "/home/runner/work/gscraper/gscraper/gscraper/__init__.py", line 1, in <module>
from .base import *
File "/home/runner/work/gscraper/gscraper/gscraper/base.py", line 3, in <module>
from .types import _KT, _VT, _PASS, ClassInstance, Arugments, Context, ContextMapper, TypeHint, LogLevel
File "/home/runner/work/gscraper/gscraper/gscraper/types.py", line 5, in <module>
from pandas import DataFrame, Series, isna
ModuleNotFoundError: No module named 'pandas'

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
Error: Process completed with exit code 1.

On Install dependencies step,

already I installed pandas from requirements.txt,

and I even explicitly installed it.

在安装依赖项的步骤中,我已经安装了Requirements s.txt中的Pandas,甚至还显式安装了它。


And on Debug installed packages step,

I can find pandas==2.0.3 installed without problem.

在Debug Installed Packages步骤中,我可以发现Pandas=2.0.3安装没有问题。


What is reason for this Github action problem,

and how could I fix this?

Github行动问题的原因是什么,我如何解决这个问题?


更多回答
优秀答案推荐
更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com