enthought

setting path in terminal

大城市里の小女人 提交于 2019-12-13 14:34:26
问题 I am installing Homebrew on my Mac in order to install Macvim. After installing Homebrew, I am prompted to run brew doctor, which in turn generates a number of warnings. I have resolved several of these but am stuck on two: Warning: Enthought Python was found in your PATH. This can cause build problems, as this software installs its own copies of iconv and libxml2 into directories that are picked up by other build systems. I'm not sure if I should simply ignore this or look for a way to

Freezing (.exe) a traitsUI program, realistically feasible?

蹲街弑〆低调 提交于 2019-12-13 14:01:16
问题 I'm trying to freeze with either cx_freeze or pyInstaller a TraitsUI program that makes use of Chaco, Traits, TraitsUI and to a lesser extent mayavi (could actually be taken out). I need this to run on mac, linux, ubuntu so am avoiding py2exe. I've intentionally uninstalled pyqt and pyside so that only the wx backend is available. Using cx_freeze, I encountered and reported a bug, so pyInstaller seems to be getting me the furthest. It generated an .exe file, but when I run the file I get

wx.lib.activex fails to import using Enthought Canopy and EPD

隐身守侯 提交于 2019-12-13 05:17:53
问题 import wx.lib.activex fails with the supplied version of wx in Enthought Canopy or EPD on Windows. How can I get the activex container to work with the Enthought Python Distributions? 回答1: First of all, it's necessary to install comtypes, which is a dependency not available through the Enthought package manager. The more serious problem however, is that Enthought seem to have erroneously omitted the two myole4ax.* files which are necessary to use the activex container in wx Python. You can

How do I make an edit_traits() GUI item responsive to changes in its dependencies?

醉酒当歌 提交于 2019-12-12 10:18:51
问题 I'm designing a HasTraits subclass with dependent properties: #!/usr/bin/env python # Example for SO question on dynamically changing Dict contents. from traits.api import HasTraits, Dict, Property, Trait, Int, cached_property from traitsui.api import View, Item class Foo(HasTraits): "Has dependent properties, which I'd like to remain up-to-date in the GUI." _dicts = [ {"zero": 0, "one": 1}, {"zero": 1, "one": 2}, {"zero": 2, "one": 3}, ] zap = Int(0) bar = Property(Trait, depends_on=["zap"])

Running winpdb from within Enthought Canopy on MacOS 10.9.2

时光总嘲笑我的痴心妄想 提交于 2019-12-12 09:15:38
问题 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

Matplotlib vline label parameter not showing

风流意气都作罢 提交于 2019-12-12 08:47:36
问题 I want to label my vertical lines with matplotlib's .vline command, but for some reason the label parameter doesn't do anything/show anything on the final plot. Does anyone know how to get the label to show? plt.vlines(x=pah, ymin=0, ymax=0.6, colors='0.75', linestyles='dashed', label='PAHs') Everything works apart from the label. Many thanks, L 回答1: The label keyword is displayed in the legend. You need create the legend explicitly to see the label in the plot: plt.vlines([1,2,3], 0, 1,

Defining view elements from dictionary elements in TraitsUI

試著忘記壹切 提交于 2019-12-11 23:33:04
问题 Is there a way to reference items in a dictionary in traitsui views? In other words, is there a way to do what I mean with the following, using a Dict trait: from traits.api import * from traitsui.api import * from traitsui.ui_editors.array_view_editor import ArrayViewEditor import numpy as np class SmallPartOfLargeApplication(HasTraits): a=Dict def _a_default(self): return {'a_stat':np.random.random((10,1)), 'b_stat':np.random.random((10,10))} traits_view=View( Item('a.a_stat',editor

Traits List not reporting items added or removed

邮差的信 提交于 2019-12-11 13:14:02
问题 Given, from enthought.traits.api import HasTraits, Tuple, Delegate, Trait, Float,Dict,List class Foo(HasTraits): def __init__(self): super(Foo,self).__init__() self.add_trait('node',List) def _node_items_changed(self,name,old,new): print name print old print new Why do I get: >>> f = Foo() >>> f.node.append(0) node_items <undefined> <traits.trait_handlers.TraitListEvent object at 0x05BA8CF0> The documentation says I should get a list of items added/removed. What am I missing here? This is

Cannot launch Canopy in GNU/Linux (openSUSE 12.3)

雨燕双飞 提交于 2019-12-11 09:23:00
问题 After installation, when I do $ ~/Canopy/canopy I get Traceback (most recent call last): File "/home/joon/Canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/__boot__.py", line 9, in <module> sys.exit(main()) File "build/bdist.linux-x86_64/egg/canopy/app/bootstrap.py", line 1335, in main File "build/bdist.linux-x86_64/egg/canopy/app/bootstrap.py", line 1315, in send_bug_report File "build/bdist.linux-x86_64/egg/canopy/feedback/data_reporter.py", line 390, in start File "/home/joon/Canopy/appdata

Canopy Does not Start on Windows 7 despite successful installation

二次信任 提交于 2019-12-11 08:51:11
问题 I have a 64bit Windows 7 machine. Never had issues with EPD. I repeatedly tried to install both 64bit and /or 32bit Enthought Canopy. Despite installation being successful neither of them starts. I looked on Task Manager and the process does not even start. I have removed every other version of Python I have had and still no ability to launch caonpy any advice on how to solve this? 回答1: Delete the environmental variables called PYTHONPATH and PYTHONHOME Go to Control Panel\System and Security