enthought

PyInstaller and Enthought Suite

巧了我就是萌 提交于 2019-12-06 01:40:29
I was wondering if anyone has any success in creating a stand alone executable using pyinstaller with a script that has enthought imports. I have been trying to do this for a couple of days now, however I keep getting an import error. Through some digging around I believe that I might need to add some hidden import and create my own hooks. However I have not heard of anyone having any success with this, so I thought I would ask here and see if anyone might have some experience with this situation. panofish I had been trying to build a stand alone exe of my python app which uses matplotlib (one

IPython tab completes only some modules

巧了我就是萌 提交于 2019-12-06 01:33:49
问题 I'm using the EPD version of python and IPython. After installing some modules using easy_install I notice that, although they can be imported, they cannot be tab completed. They exist on the path but, while included modules (pylab, readline, math) can be completed, these new modules cannot. Anyone know what I should look into to find the problem? I've checked that the packages are in the same place as other modules: In [1]: import pylab In [2]: pylab Out[2]: <module 'pylab' from '/Library

How can I fire a Traits static event notification on a List?

空扰寡人 提交于 2019-12-05 06:58:36
I am working through the traits presentation from PyCon 2010 . At about 2:30:45 the presenter starts covering trait event notifications , which allow (among other things) the ability to automatically call a subroutine any time a trait has changed. I am running a modified copy of the example he gave... In this trial, I am trying to see whether I can fire a static event whenever I make a change to volume or inputs . from traits.api import HasTraits, Range, List, Float import traits class Amplifier(HasTraits): """ Define an Amplifier (a la Spinal Tap) with Enthought's traits. Use traits to

Dynamically add legends to matplotlib plots in python

丶灬走出姿态 提交于 2019-12-05 05:07:34
I have a set of plots in python and want to add legends to each of them separately. I am generating the plots in a for loop and want to add the legends dynamically. Im getting only the last legend shown. I want all 9 off them to be displayed for q in range(1,10): matplotlib.pylab.plot(s_A_approx, label = q) matplotlib.pylab.legend(loc = 'upper left') matplotlib.pylab.show() I can't reproduce your problem. With a few adjustments to your script, what you're expecting is working for me. import matplotlib.pylab import numpy as np for q in range(1,10): # create a random, 100 length array s_A_approx

IPython, Sage, Dependencies, Anaconda, and Package Integration?

不打扰是莪最后的温柔 提交于 2019-12-05 03:14:09
问题 I've just started using IPython for interactive development and exploratory research, which I've found really exciting with all the cool features and possibilities. I am using the Anaconda package manager to manage dependencies, which includes IPython. From what I've read, one goal of the IPython team is to eventually integrate Sage Math (CAS) into IPython, as a cell magic. Does anyone know if this is still under development? Or rather, if I wanted to use Sage now, is writing an extension the

Importing mayavi from python creates pop-up with black background on UI (Mavericks/Canopy)

送分小仙女□ 提交于 2019-12-04 22:19:26
Image gallery: http://imgur.com/a/qZkTW#qGj7I0H I just installed the new version of Canopy 1.3 from enthought. I opened up ipython, and I imported mayavi's mlab without issue. I then plotted a 3d sphere without issue using the following: import mayavi from mayavi import mlab mlab.points3d(1,1,1) mlab.show() And I get what I would expect (See figure #2 in gallery). I can then open up the scene editor without issue (see figure #1 in gallery), but when I try to open any other traits editors for anything else, I get a weird black background with no text: scalarscatter editor This issue affects all

ImportError: No module named lib. Unable to import pandas, numpy, scipy, matplotlib

旧城冷巷雨未停 提交于 2019-12-04 21:40:02
I recently updated a number of packages and my version of EPD Canopy (to1.4.1.1975) and now I'm unable to import pandas , numpy , scipy or matplotlib . I get the ImportError below. I've also tried importing from the command prompt but I can the same error. pandas - 0.14.0-1 numpy - 1.8.0-2 scipy - 0.14.0-1 matplotlib - 1.3.1-8 Does anybody have any suggestions as to how I could fix this? From this Stackoverflow question it seems like I might need to change/move something to a different directory. Could somebody explain how I could go about this? This documentation was suggested but I'm not

py2exe with enthought and pandas

不打扰是莪最后的温柔 提交于 2019-12-04 18:38:56
I am trying to make an executable with python, py2exe using Enthought . The program.py starts with: import pandas as pd import pyper as pr r=pr.R(use_pandas=True) The setup.py is as below: from distutils.core import setup import py2exe import matplotlib import sys opts={"py2exe":{"bundle_files"}} sys.argv.append('py2exe') opts = {'py2exe': {"bundle_files" : 3, "includes" : [ "matplotlib.backends", "matplotlib.backends.backend_qt4agg", "pylab","numpy", "matplotlib.backends.backend_tkagg"], 'excludes':['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo'], 'dll

Running winpdb from within Enthought Canopy on MacOS 10.9.2

对着背影说爱祢 提交于 2019-12-04 18:12:04
I have Enthought Canopy 1.4 installed on MacOS 10.9.2. Trying to run the winpdb debugger results in the following message: This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac. As a workaround, I tried creating a shell script run.sh , containing PYVER=2.7 PYTHON=/System/Library/Frameworks/Python.framework/Versions/$PYVER/bin/python$PYVER # find the root of the virtualenv, it should be the parent of the dir this script is in ENV=`$PYTHON -c "import os; print os.path.abspath(os.path.join(os.path

Chaco MultiLinePlot - unable to get simple plot to display, wondering if package broken?

冷暖自知 提交于 2019-12-04 17:15:54
I am trying to create a multi line plot to display multiple time series data (voltages) from a 2D NumPy array. I have started very simply trying to plot two lines with ten data points from a 2x10 array, but I am not even able to get this to work without getting a large amount of error output that I am unable to debug. Imports: import numpy from traits.api import HasTraits, Instance from traitsui.api import View, Item from chaco.api import MultiLinePlot, ArrayDataSource, MultiArrayDataSource from enable.component_editor import ComponentEditor Test array: test_array = numpy.random.rand(10,2)