Can not import avx core while this file exists

在使用Docker打包过程中遇到了Python环境的问题,具体表现为无法导入avxcore模块和libgomp.so.1库缺失。解决方法是通过在宿主机上找到libgomp.so.1的位置,并将其复制到Docker容器的/usr/lib目录下,从而解决了运行时依赖问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用docker打包的时候遇到:

Error: Can not import avx core while this file exists: /usr/local/lib/python3.7/site-packages/paddle/fluid/core_avx.so

和:

 libgomp.so.1: cannot open shared object file: No such file or directory

各种折腾后,用的办法是把库拷贝到了docker下面:

1、查找 libgomp.so.1的位置:

whereis  libgomp.so.1

2、将找到的 libgomp.so.1拷贝到docker的/user/lib下面:

COPY ./soft/libgomp.so.1 /usr/lib

就可以了

PySimpleGUI is now located on a private PyPI server. Please add to your pip command: -i https://PySimpleGUI.net/install The version you just installed should uninstalled: python -m pip uninstall PySimpleGUI python -m pip cache purge Then install the latest from the private server: python -m pip install --upgrade --extra-index-url https://PySimpleGUI.net/install PySimpleGUI You can also force a reinstall using this command and it'll install the latest regardless of what you have installed currently python -m pip install --force-reinstall --extra-index-url https://PySimpleGUI.net/install PySimpleGUI Use python3 command if you're running on the Mac or Linux Error: Can not import paddle core while this file exists: C:\Users\11628\.conda\envs\Video-subtitle-remover\lib\site-packages\paddle\base\libpaddle.pyd Traceback (most recent call last): File "F:\pytharm\Video-subtitle-remover\video-subtitle-remover\gui.py", line 17, in <module> import backend.main File "F:\pytharm\Video-subtitle-remover\video-subtitle-remover\backend\main.py", line 12, in <module> import config File "F:\pytharm\Video-subtitle-remover\video-subtitle-remover\backend\config.py", line 10, in <module> import paddle File "C:\Users\11628\.conda\envs\Video-subtitle-remover\lib\site-packages\paddle\__init__.py", line 28, in <module> from .base import core # noqa: F401 File "C:\Users\11628\.conda\envs\Video-subtitle-remover\lib\site-packages\paddle\base\__init__.py", line 36, in <module> from . import core File "C:\Users\11628\.conda\envs\Video-subtitle-remover\lib\site-packages\paddle\base\core.py", line 380, in <module> raise e File "C:\Users\11628\.conda\envs\Video-subtitle-remover\lib\site-packages\paddle\base\core.py", line 268, in <module> from . import libpaddle ImportError: generic_type: type "_gpuDeviceProperties" is already registered!
03-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值