Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82528
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jean-michel.richer@univ-angers.fr> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.033 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'error:': 0.07; 'float': 0.07; 'importerror:': 0.07; 'python': 0.11; 'bug': 0.12; '""")': 0.16; '*a,': 0.16; 'dest': 0.16; 'numpy': 0.16; 'range,': 0.16; 'skip:" 80': 0.16; 'trying': 0.19; 'input': 0.22; 'import': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'script.': 0.24; 'subject:problem': 0.24; 'script': 0.25; 'mod': 0.31; 'void': 0.31; 'workaround': 0.31; 'file': 0.32; 'skip:m 30': 0.32; 'run': 0.32; '(most': 0.33; 'received:fr': 0.33; 'subject:with': 0.35; 'but': 0.35; 'there': 0.35; 'hi,': 0.36; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:172.20': 0.60; 'new': 0.61; 'name': 0.63; 'skip:n 10': 0.64; 'received:194': 0.64; 'skip:n 40': 0.81; '6.5': 0.84; 'const': 0.84; 'cuda': 0.84; 'intern': 0.84; 'intern,': 0.84 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Date | Sun, 14 Dec 2014 07:25:39 +0100 |
| From | jean-michel richer <jean-michel.richer@univ-angers.fr> |
| To | <python-list@python.org> |
| Subject | problem with six.moves intern importError |
| Organization | LERIA |
| X-Sender | jean-michel.richer@univ-angers.fr |
| User-Agent | Roundcube Webmail/0.7.1 |
| X-Mailman-Approved-At | Sun, 14 Dec 2014 23:01:02 +0100 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16957.1418594464.18130.python-list@python.org> (permalink) |
| Lines | 57 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1418594464 news.xs4all.nl 2938 [2001:888:2000:d::a6]:44786 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:82528 |
Show key headers only | View raw
Hi,
I am new to python and I am trying to use pycuda but get some
error on the following script. My environement is :
Python 2.7.6
libboost 1.54
gcc/g++ 4.8.2
CUDA 6.5
================================
import pycuda.autoinit
import pycuda.driver as drv
import numpy
from pycuda.compiler import SourceModule
mod = SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
const int i = threadIdx.x;
dest[i] = a[i] * b[i];
}
""")
multiply_them = mod.get_function("multiply_them")
a = numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)
dest = numpy.zeros_like(a)
multiply_them(
drv.Out(dest), drv.In(a), drv.In(b),
block=(400,1,1), grid=(1,1))
print dest-a*b
================================
when I run the script I get the followin import error:
$ python ex_pycuda.py
Traceback (most recent call last):
File "ex_pycuda.py", line 5, in <module>
from pycuda.compiler import SourceModule
File
"/usr/local/lib/python2.7/dist-packages/pycuda-2014.1-py2.7-linux-x86_64.egg/pycuda/compiler.py",
line 1, in <module>
from pytools import memoize
File
"/usr/local/lib/python2.7/dist-packages/pytools-2014.3.5-py2.7.egg/pytools/__init__.py",
line 5, in <module>
from six.moves import range, zip, intern, input
ImportError: cannot import name intern
Is there a workaround or is it a bug ?
Best regards,
Jean-Michel
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
problem with six.moves intern importError jean-michel richer <jean-michel.richer@univ-angers.fr> - 2014-12-14 07:25 +0100
csiph-web