Hi all,
I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe for this purpose but every time I try to make this exe using a setup file I get these errors. Final.py is my python code.
Traceback (most recent call last):
File "Final.py", line 5, in <module>
File "pylab.pyc" , line 1, in <module>
File "matplotlib\pyl ab.pyc", line 204, in <module>
File "matplotlib\mpl .pyc", line 10, in <module>
File "matplotlib\fig ure.pyc", line 33, in <module>
File "matplotlib\pro jections\__init __.pyc", line 1, in <module>
File "matplotlib\pro jections\geo.py c", line 4, in <module>
File "matplotlib\num erix\__init__.p yc", line 166, in <module>
ImportError: No module named ma
I checked out 'ma' which is actually a import line in geo.py which says:
from matplotlib.nume rix import npyma as ma
I guess there is a problem with importing these files. This is my setup file:
from distutils.core import setup
import sys
import os
import glob
import py2exe
import matplotlib
import numpy
opts = {
'py2exe': { "includes" : [ "matplotlib.bac kends", "matplotlib.bac kends.backend_q t4agg",
"matplotlib.fig ure","pylab", "numpy", "matplotlib.num erix.fft",
"matplotlib.num erix.linear_alg ebra", "matplotlib.num erix.random_arr ay",
"matplotlib.bac kends.backend_t kagg", "matplotlib.pro jections" , ],
'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg',
'_fltkagg', '_gtk', '_gtkcairo', ],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll']
}
}
data_files = [(r'mpl-data', glob.glob(r'C:\ Python25\Lib\si te-packages\matplo tlib\mpl-data\*.*')),
(r'mpl-data', [r'C:\Python25\L ib\site-packages\matplo tlib\mpl-data\matplotlib rc']),
(r'mpl-data\images',gl ob.glob(r'C:\Py thon25\Lib\site-packages\matplo tlib\mpl-data\images\*.* ')),
(r'mpl-data\fonts',glo b.glob(r'C:\Pyt hon25\Lib\site-packages\matplo tlib\mpl-data\fonts\*.*' ))]
setup(windows=[{"script" : "Final.py"}], options=opts, data_files=data _files)
Can someone please help me with this.
Thanks,
0 4324 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Thomas Heller |
last post by:
I'm currently working on a new version of py2exe, which will require
Python 2.3 and later, because it uses the zipimport mechanism.
Since py2exe is a distutils extension, and since C compilers are
commonly available on most platforms except Windows, it would be fairly
easy to let py2exe generate a C source file installing this import hook,
and let distutils' C compiler build an executable file from this.
Would this be useful, or would...
|
by: scott |
last post by:
I am trying to convert a python app that uses matplotlib to a
standalone executable using py2exe.
After running py2exe and executing my app I get the following stack
trace:
Traceback (most recent call last):
File "gcToCsv.py", line 5, in ?
File "plot_output.pyc", line 1, in ?
File "pylab.pyc", line 1, in ?
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.4 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are supported.
Changes in 0.6.4:
|
by: bwaha |
last post by:
First time trying to create an executable with py2exe. I have a small
program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'),
matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP &
Win2000. The program runs without problem but as an exe it doesn't even get
to showing the GUI.
I get the following error log when I run the executable.
Traceback (most recent call last):
File "mpival3.py", line 1264, in ?
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.6 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are supported.
Changes in 0.6.6:
| |
by: vajratkarviraj |
last post by:
i hav python2.5, matplotlib0.90.1, and py2exe for python 2.5 all on windows xp... i hav a python program(letsc.py) which uses the matplotlib package... and i want 2 make an exe of it for distribution on other comps... i used py2exe... i wrote a setup.py whose contents are :
from distutils.core import setup
import py2exe
import matplotlib
setup(console=,
options={
'py2exe': {
'packages' : ,
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.8 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are supported.
Changes in 0.6.8:
|
by: Larry Bates |
last post by:
Jimmy Retzlaff wrote:
Everyone,
Thanks for all your hard work on py2exe, it is greatly appreciated.
-Larry Bates
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.9 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are supported.
Changes in 0.6.9:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |