enthought

Using TraitsUI in Mayavi to create a GUI, magnetic field simulation

末鹿安然 提交于 2019-12-04 16:46:55
I am currently working on a project that I have to simulate the magnetic field produced by a circular wire loop. I have written a piece of code and put it into a class, that works perfectly, but when I try to create a GUI using TaitsUI, it just fails. I have no idea how should I connect the one to the other. class Wireloop: x,y,z = np.mgrid[-10:10:150j, -10:10:150j, -10:10:150j] ### Transform to Cylindrial Polar r = np.sqrt(x**2 + y**2) # ρ in polar x_trans = x/r # cos(θ) y_trans = y/r # sin(θ) """ """ def __init__(self, R, I): self.R = R #radious self.I = I #DC current #Constants self.mew0 =

Make sure numpy is using MKL library on mac pro

有些话、适合烂在心里 提交于 2019-12-04 10:06:27
问题 I am using Enthought's Canopy/EPD version of python which ships with numpy linked against MKL. I am currently running a set of simulations in parallel (using PP) on both my work computer (Windows 7, Quad Core i5 @ 3.33 Ghz, 4 GB ram) and my home workstation (Mac Pro 3.1, Ubuntu 12.04, 2x Quad Core Xeon @ 2.8 Ghz, 6 GB ram). But when I benchmark my simulations, they run much quicker on the work computer (35 seconds per iteration vs. 60 on the mac pro). The problem is being perfectly balanced

Can I relink enthought python to new version of openssl on Mac OS X?

情到浓时终转凉″ 提交于 2019-12-04 08:33:01
问题 This morning, I'm running into SSL related problems using EPD 7.3 on Mac OS X 10.6.8. When I run pip (version 1.3.1), I get: pip install requests Downloading/unpacking requests Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> Will skip URL https://pypi.python.org/simple/requests/ when looking for download

IPython tab completes only some modules

会有一股神秘感。 提交于 2019-12-04 06:57:35
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/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/pylab.pyc'> In [3]: import

Error importing matplotlib.pyplot

纵饮孤独 提交于 2019-12-04 06:03:11
问题 When I run import matplotlib.pyplot as plt , I get the following error message: --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-6f467123fe04> in <module>() ----> 1 import matplotlib.pyplot /Library/Python/2.7/site-packages/matplotlib/pyplot.py in <module>() 21 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike 22 from matplotlib import docstring ---> 23 from matplotlib.figure

Installing Pygame on Mac into Enthought build

筅森魡賤 提交于 2019-12-04 05:31:50
问题 There were a number of unanswered questions on installing Pygame on a Mac but I am going to ask my specific question here and hope for an answer. I have been having incredible difficulty installing Pygame onto my Mac. I use the Enthought version EPD 7.3-2 32 bit and it is my default framework so if I type python at the terminal prompt I get: $ python Enthought Python Distribution (EPD) free version -- www.enthought.com Version: 7.3-2 (32-bit) I have successfully installed additional modules

pyside-rcc “dyld: Library not loaded:…”

半城伤御伤魂 提交于 2019-12-04 05:31:43
问题 I'm a python and Qt rookie and I have some problems running pyside-rcc (and pyrcc4). The problem is not the link to the executable but a library problem it seems. That I'm not a unix wizard, probably doesn't help either:) When I run $ pyside-rcc i get the following error dyld: Library not loaded: @rpath/lib/QtCore.framework/Versions/4/QtCore Referenced from: /Users/[USERNAME]/Library/Enthought/Canopy_64bit/User/bin/pyside-rcc Reason: image not found Trace/BPT trap: 5 For $ pyrcc4 the error is

Disable or Catch VTK warnings in vtkOutputWindow when embedding Mayavi

江枫思渺然 提交于 2019-12-04 05:23:23
I'd like to either disable the VTK warning window or, better yet, catch them to handle with my application's logging system. My application is using an embedded mayavi view, and I don't want error windows popping up that I have no control over. The following code demonstrates the warning window. import numpy as np from mayavi import mlab x1 = np.array([1, 1, 2, 3]) y1 = np.array([1, 1, 4, 2]) z1 = np.array([1, 1, 5, 1]) mlab.plot3d(x1, y1, z1) mlab.show() Ok, I've done some research and discovered that vtk.vtkObject.GlobalWarningDisplayOff() will disable the window completely, which is nice.

scipy with enthought canopy

我的梦境 提交于 2019-12-04 05:19:52
问题 I am evaluating the Enthought package. I installed the 32bit canopy (downloaded from https://www.enthought.com/downloads/) in Ubuntu. $ sudo bash canopy-1.0.1-rh5-32.sh Upon testing I don't see scipy in /usr/local/Canopy/appdata/canopy-1.0.0.1160.rh5-x86/lib/python2.7/site-packages : $ /usr/local/Canopy/appdata/canopy-1.0.0.1160.rh5-x86/bin/python Enthought Canopy Python 2.7.3 | 32-bit | (default, Mar 25 2013, 15:45:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Type "help", "copyright

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

泄露秘密 提交于 2019-12-03 16:36:26
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 only way to do this [1]? [1] https://github.com/ipython/ipython/wiki/Extensions-Index Also, if I