在Heroku上安装Pandas会崩溃

9rygscc1  于 2023-02-02  发布在  其他
关注(0)|答案(1)|浏览(141)

我正在部署到Heroku的一个python脚本每次尝试构建部署时都会崩溃,因为panda依赖关系。我尝试过更改python运行时版本,将requirements.txt中的版本去掉,但仍然无法运行。我们如何安装panda?
以下是日志:

-----> Building on the Heroku-22 stack

-----> Using buildpack: heroku/python

-----> Python app detected

-----> Using Python version specified in runtime.txt

 !     

 !     A Python security update is available! Upgrade as soon as possible to: python-3.9.16

 !     See: https://devcenter.heroku.com/articles/python-runtimes

 !     

-----> Python version has changed from python-3.10.9 to python-3.9.13, clearing cache

-----> Requirements file has been changed, clearing cached dependencies

-----> Installing python-3.9.13

-----> Installing pip 22.3.1, setuptools 63.4.3 and wheel 0.37.1

-----> Installing SQLite3

-----> Installing requirements with pip

       Collecting discord

         Downloading discord-2.1.0-py3-none-any.whl (1.1 kB)

       Collecting discord.py

         Downloading discord.py-2.1.0-py3-none-any.whl (1.1 MB)

       Collecting pandas

         Downloading pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)

       Collecting py-tda-api

         Downloading py_tda_api-0.1.2-py3-none-any.whl (46 kB)

       Collecting bdateutil

         Downloading bdateutil-0.1.tar.gz (24 kB)

         Preparing metadata (setup.py): started

         Preparing metadata (setup.py): finished with status 'done'

       Collecting python-dotenv

         Downloading python_dotenv-0.21.1-py3-none-any.whl (19 kB)

       Collecting pytz

         Downloading pytz-2022.7.1-py2.py3-none-any.whl (499 kB)

       Collecting requests

         Downloading requests-2.28.2-py3-none-any.whl (62 kB)

       Collecting tda-api

         Downloading tda_api-1.6.0-py2.py3-none-any.whl (95 kB)

       Collecting aiohttp<4,>=3.7.4

         Downloading aiohttp-3.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)

       Collecting python-dateutil>=2.8.1

         Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)

       Collecting numpy>=1.20.3

         Downloading numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)

       Collecting websockets>=9.1

         Downloading websockets-10.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)

       Collecting dataclasses>=0.6

         Downloading dataclasses-0.6-py3-none-any.whl (14 kB)

       INFO: pip is looking at multiple versions of py-tda-api to determine which version is compatible with other requirements. This could take a while.

       Collecting py-tda-api

         Downloading py_tda_api-0.1.1-py3-none-any.whl (56 kB)

       INFO: pip is looking at multiple versions of pandas to determine which version is compatible with other requirements. This could take a while.

       Collecting pandas

         Downloading pandas-1.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)

         Downloading pandas-1.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)

         Downloading pandas-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)

         Downloading pandas-1.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

         Downloading pandas-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

         Downloading pandas-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

         Downloading pandas-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

       INFO: pip is looking at multiple versions of pandas to determine which version is compatible with other requirements. This could take a while.

         Downloading pandas-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

         Downloading pandas-1.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)

         Downloading pandas-1.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)

         Downloading pandas-1.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)

         Downloading pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)

       INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.

         Downloading pandas-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)

         Downloading pandas-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (10.6 MB)

         Downloading pandas-1.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.2.4-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.2.3-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.2.2-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.2.1-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.2.0-cp39-cp39-manylinux1_x86_64.whl (9.7 MB)

         Downloading pandas-1.1.5-cp39-cp39-manylinux1_x86_64.whl (9.3 MB)

         Downloading pandas-1.1.4-cp39-cp39-manylinux1_x86_64.whl (9.3 MB)

         Downloading pandas-1.1.3-cp39-cp39-manylinux1_x86_64.whl (9.3 MB)

         Downloading pandas-1.1.2.tar.gz (5.2 MB)

         Installing build dependencies: started

         Installing build dependencies: still running...

         Installing build dependencies: still running...

         Installing build dependencies: still running...

         Installing build dependencies: finished with status 'done'

         Getting requirements to build wheel: started

         Getting requirements to build wheel: finished with status 'done'

         Preparing metadata (pyproject.toml): started

         Preparing metadata (pyproject.toml): finished with status 'done'

         Downloading pandas-1.1.1.tar.gz (5.2 MB)

         Installing build dependencies: started

         Installing build dependencies: finished with status 'done'

         Getting requirements to build wheel: started

         Getting requirements to build wheel: finished with status 'done'

         Preparing metadata (pyproject.toml): started

         Preparing metadata (pyproject.toml): finished with status 'done'

         Downloading pandas-1.1.0.tar.gz (5.2 MB)

         Installing build dependencies: started

         Installing build dependencies: finished with status 'done'

         Getting requirements to build wheel: started

         Getting requirements to build wheel: finished with status 'done'

         Preparing metadata (pyproject.toml): started

         Preparing metadata (pyproject.toml): finished with status 'done'

         Downloading pandas-1.0.5.tar.gz (5.0 MB)

         Installing build dependencies: started

         Installing build dependencies: finished with status 'done'

         Getting requirements to build wheel: started

...

on-39/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
remote:                    [end of output]
remote:              
remote:                note: This error originates from a subprocess, and is likely not a problem with pip.
remote:              error: legacy-install-failure
remote:              
remote:              × Encountered error while trying to install package.
remote:              ╰─> numpy
remote:              
remote:              note: This is an issue with the package mentioned above, not pip.
remote:              hint: See above for output from the failure.
remote:              
remote:              [notice] A new release of pip available: 22.3.1 -> 23.0
remote:              [notice] To update, run: pip install --upgrade pip
remote:              [end of output]
remote:          
remote:          note: This error originates from a subprocess, and is likely not a problem with pip.
remote:        error: subprocess-exited-with-error
remote:        
remote:        × pip subprocess to install build dependencies did not run successfully.
remote:        │ exit code: 1
remote:        ╰─> See above for output.
remote:        
remote:        note: This error originates from a subprocess, and is likely not a problem with pip.
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...

更改版本不会执行任何操作。

qfe3c7zg

qfe3c7zg1#

显然,删除另一个模块bdateutil解决了这个问题,因为似乎与panda中的date-util冲突。

相关问题