canopy

Python keras neural network (Theano) package returns an error about data dimensions

浪子不回头ぞ 提交于 2019-12-03 21:10:46
I have this code: import numpy as np from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import SGD from sklearn import datasets import theano iris = datasets.load_iris() X = iris.data[:,0:3] # we only take the first two features. Y = iris.target X = X.astype(theano.config.floatX) Y = Y.astype(theano.config.floatX) model = Sequential() model.add(Dense(150, 1, init='uniform')) model.add(Activation('tanh')) model.add(Dropout(0.5)) model.add(Dense(150, 1, init='uniform')) model.add(Activation('tanh')) model.add(Dropout(0.5)) model.add

Display of “Canopy” on command line

China☆狼群 提交于 2019-12-03 15:58:25
I have a basic terminal question. I just installed enthought's Canopy for Python on Snow Leopard, and (Canopy 64bit) continually shows up when I'm working on the command line. EX: (Canopy 64bit) Macbook~[username]$ I've tried editing my bashrc file, to no avail. bashrc currently has this: # System-wide .bashrc file for interactive bash(1) shells. if [ -z "$PS1" ]; then return fi PS1="Macbook~\u\$" # Make bash check its window size after a process completes shopt -s checkwinsize -- Is there any way to stop "(Canopy 64bit)" from displaying? It's in .bash_profile. But you'll probably have to log

py2exe fails with pandas import

南楼画角 提交于 2019-12-02 11:27:35
问题 I have a python script that I want to make into an executable using py2exe. It fails when I try to import pandas (this is literally all I have in my example failing script): import pandas The traceback looks like: File "c:\users\***\appdata\local\enthought\canopy\user\lib\site_packages\py2exe\mf.py", line 724, in import_hook return Base.import_hook(self,name,caller,fromlist,level) RuntimeError: maximum recursion depth exceeded I suspect that the problem may have something to do with the

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

寵の児 提交于 2019-12-02 06:54:58
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 similar but not exactly the same: dyld: Library not loaded: @rpath/lib/QtXml.framework/Versions/4

py2exe fails with pandas import

心已入冬 提交于 2019-12-02 06:32:16
I have a python script that I want to make into an executable using py2exe. It fails when I try to import pandas (this is literally all I have in my example failing script): import pandas The traceback looks like: File "c:\users\***\appdata\local\enthought\canopy\user\lib\site_packages\py2exe\mf.py", line 724, in import_hook return Base.import_hook(self,name,caller,fromlist,level) RuntimeError: maximum recursion depth exceeded I suspect that the problem may have something to do with the Canopy Python distribution, but I don't have an easy alternative to test. Here is my setup file: distutils

scipy with enthought canopy

戏子无情 提交于 2019-12-02 03:26:33
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", "credits" or "license" for more information. >>> import scipy Traceback (most recent call last):

Multiple kernels in Enthought Canopy

假如想象 提交于 2019-12-01 09:14:13
I previously worked with the EPD Python distribution using its Qt-console, where one of the most useful features was easily having multiple kernels in multiple tabs, when doing several calculations simultaneously. I recently got the "new" Enthought Canopy, which somehow tries to emulate MatLab, which might not be bad perse. Here comes the problem: How do I get multiple tabs with separated kernels with Canopy? For completeness, I am running Canopy 1.1.0 on Ubuntu-Gnome 13.04. The Canopy GUI application does not yet support multiple kernels. However, just like with EPD, you can run QtConsole,

Can't upgrade matplotlib in Ubuntu 12.04 with Canopy installed

天涯浪子 提交于 2019-11-30 22:10:15
I'm trying to upgrade matplotlib in Ubuntu 12.04 . When I run the command: sudo pip install --upgrade matplotlib I get this error: Downloading/unpacking matplotlib Running setup.py egg_info for package matplotlib The required version of distribute (>=0.6.28) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U distribute'. (Currently using distribute 0.6.24dev-r0 (/usr/lib/python2.7/dist-packages)) Complete output from command python setup.py egg_info: The required version of distribute (>=0.6.28) is not

Can't upgrade matplotlib in Ubuntu 12.04 with Canopy installed

岁酱吖の 提交于 2019-11-30 17:09:07
问题 I'm trying to upgrade matplotlib in Ubuntu 12.04 . When I run the command: sudo pip install --upgrade matplotlib I get this error: Downloading/unpacking matplotlib Running setup.py egg_info for package matplotlib The required version of distribute (>=0.6.28) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U distribute'. (Currently using distribute 0.6.24dev-r0 (/usr/lib/python2.7/dist-packages)) Complete

How we can use iter_rows() in Python openpyxl package?

匆匆过客 提交于 2019-11-30 06:58:53
I'm using openpyxl package in Python(Canopy) to use excel files. We have this tutorial in this link : LINK you can also use the openpyxl.worksheet.Worksheet.iter_rows() method: >>> tuple(ws.iter_rows('A1:C2')) ((<Cell Sheet1.A1>, <Cell Sheet1.B1>, <Cell Sheet1.C1>), (<Cell Sheet1.A2>, <Cell Sheet1.B2>, <Cell Sheet1.C2>)) >>> for row in ws.iter_rows('A1:C2'): ... for cell in row: ... print cell <Cell Sheet1.A1> <Cell Sheet1.B1> <Cell Sheet1.C1> <Cell Sheet1.A2> <Cell Sheet1.B2> <Cell Sheet1.C2> How we can import openpyxl.worksheet.Worksheet.iter_rows() method in python? I used this code: import