找不到使用py2exe和'libiomp5md.dll'在Python中打包软件 [英] pack a software in Python using py2exe with 'libiomp5md.dll' not found

查看:64
本文介绍了找不到使用py2exe和'libiomp5md.dll'在Python中打包软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7操作系统上有Python 2.7.我希望使用py2exe将我的project.py打包到一个可执行文件中.按照说明,我编写了一个setup.py文件

I have Python 2.7 on Window 7 OS. I wish to pack my project.py in an Executable using py2exe. Following the instruction i wrote a setup.py file

from distutils.core import setup
import py2exe

setup(console=["project.py"])  

我收到了此消息

我试图排除' libiomp5md.dll '

from distutils.core import setup
import py2exe

setup(console=["SegmentationAccuracy.py"])

dll_excludes = ['libiomp5md.dll']

但是我总是收到相同的错误消息错误:libiomo5md.dll:没有这样的文件或目录"

but always i got the same error message "error: libiomo5md.dll: No such file or directory"

我的可执行文件包含:

import math
import os
import numpy as np
import sys
import ogr
from progressbar import ProgressBar
from shapely.geometry import Polygon
nan = np.nan

推荐答案

我遇到了同样的问题,但是在setup.py中调用import numpy解决了该问题

I had the same problem, but calling import numpy within setup.py resolved the issue

这篇关于找不到使用py2exe和'libiomp5md.dll'在Python中打包软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆