gpt4 book ai didi

python - cx_Freeze 错误 : baseline image directory does not exist

转载 作者:行者123 更新时间:2023-12-03 14:06:41 27 4
gpt4 key购买 nike

我正在尝试使用 cx_Freeze 库在 Anaconda 虚拟环境中的 Windows 上的 python 脚本中创建一个可执行文件。我试图用 6.1 版来做,但我遇到了错误 Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll .然后我将 cx_Freeze 升级到 6.2 版本,这是我运行 python setup.py build 时得到的输出:

running build
running build_exe
C:\Users\--\Anaconda3\lib\site-packages\cx_Freeze\finder.py:309: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
Install tornado itself to use zmq with the tornado IOLoop.

deferredImports, namespace = namespace)
Using TensorFlow backend.
2020-07-10 08:51:47.876748: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2020-07-10 08:51:47.885038: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
C:\Users\--\Anaconda3\lib\site-packages\IPython\html.py:14: ShimWarning: The IPython.html package has been deprecated since IPython 4.0. You should import from notebook instead. IPython.html.widgets has moved to ipywidgets.
"IPython.html.widgets has moved to ipywidgets.", ShimWarning)
C:\Users\--\Anaconda3\lib\site-packages\IPython\kernel\__init__.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
"You should import from ipykernel or jupyter_client instead.", ShimWarning)
error: The baseline image directory does not exist. This is most likely because the test data is not installed. You may need to install matplotlib from source to get the test data.
以下是文件 setup.py的内容:
from cx_Freeze import setup, Executable 

exe = Executable(script="mainDefectDetection.py",targetName="Test.exe")
setup(name = "try", version = "0.1", description = "", options = {'build_exe': {'include_files':["../../../../Anaconda3/Library/bin/mkl_intel_thread.dll"]}},executables = [exe])
我尝试重新安装 matplotlib( pip uninstall matpolotlibpip install matplotlib ),但没有任何改变。

最佳答案

我原来的答案:https://github.com/marcelotduarte/cx_Freeze/issues/692#issuecomment-657125847
我已经确定了这个问题的根源,它是补丁 7ec3eaa。
使用 matplot 示例,我发现 numpy 1.18.3 到 1.19 和枕头 7.x 存在问题,我正在调查。
目前,它有一个解决方法。pip install "numpy<1.18.3" "pillow<7"要构建添加 ["matplotlib.tests", "numpy.random._examples"] 以排除或构建:python setup.py build_exe --excludes=matplotlib.tests,numpy.random._examples如果您的 setup.py 中有“排除”,请将两个排除的模块添加到其中,设置中的选项是唯一的。

关于python - cx_Freeze 错误 : baseline image directory does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62828976/

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