1
プロジェクトを.exeファイルにコンパイルしようとしています。cx_freezeプロジェクトを.exeファイルにビルドし、numpyのインポートエラーを取得する
私はインターネットでcx_freezeがこれに適していると読んでいます。 だから私はこのsetup.pyスクリプトがあります。
import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["functions"], "excludes": ["tkinter"]}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "Bacteria Data Analysis",
version = "0.1",
description = "This program analyses data from experiments",
options = {"build_exe": build_exe_options},
executables = [Executable("main.py", base=base)])
をそしてそれはでうまく構築します
:pythonのしかし、私は私の.exeのプログラムを実行しようとすると、私はこのエラーを取得するの構築のsetup.py
は、何らかの形でnumpyのために関連しているように見えるが...私はインストールしてnumpyのをアンインストールしたが、残念ながら運なしでそれを修正する方法を見つけ出すことはできません。
CMDに「パイソン」を実行しているから私の出力は、以下の通りである:
Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24)
[MSC v.1900 64 bit (AMD64)] on win32