Did a quick test and virtualenv seems to work fine:
virtualenv venvtest
source venvtest/bin/activate
pip install pyopencl
then import pyopencl does not complain at least...
Tim
> Hello,
>
> I recently installed pyopencl on Mac OS 10.10.2 using default system python (Python 2.7.6 [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]) and $ pip install pyopencl .
>
> Installation was painless, but when it came to importing pyopencl I got the error:
>
> ---
> File "/Library/Python/2.7/site-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
> —--
>
> It seems that pytools works okay without “intern”, so the following quick fix to pytools/__init__.py seems to work:
> ---
> try:
> from six.moves import range, zip, intern, input
> except ImportError:
> from six.moves import range, zip, input
> —--
>
> OSX system python includes six-1.4.1 -- is it possible to get pyopencl
> to work with this version so we don't have to use this kludge? Are
> there any other reasons that installation on OS X system python will
> not work?
My suggestion would be to install an upgraded six along with PyOpenCL
in a virtualenv:
https://virtualenv.pypa.io/en/latest/
Andreas
Hello,
I recently installed pyopencl on Mac OS 10.10.2 using default system python (Python 2.7.6 [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]) and $ pip install pyopencl .
Installation was painless, but when it came to importing pyopencl I got the error:
---
File "/Library/Python/2.7/site-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
—--
It seems that pytools works okay without “intern”, so the following quick fix to pytools/__init__.py seems to work:
---
try:
from six.moves import range, zip, intern, input
except ImportError:
from six.moves import range, zip, input
—--
OSX system python includes six-1.4.1 -- is it possible to get pyopencl to work with this version so we don't have to use this kludge? Are there any other reasons that installation on OS X system python will not work?
Many thanks,
Will
__________________________________________________
Will Smith - william.smith(a)balliol.ox.ac.uk<mailto:william.smith@balliol.ox.ac.uk>
MChem Hons. (Oxon)
DPhil candidate in Systems Biology
Shawn Zhou <xiangyuzhouee(a)gmail.com> writes:
> I got the same problem with the latest six, though...
That's not likely--you may have installed a new six, but your Python is
probably still using the old copy.
Try
>>> import six
>>> six.__file__
to see where the old version sits.
Andreas
Hi list,
sorry to use list for installation problems.
I am fighting a bit with loopy+pyopencl installation.
In fact it is already installed (pyopencl via pipy and loopy via github)
on ubuntu 14.10.
But I get this when running hello-loopy.py:
File "hello-loopy.py", line 20, in <module>
"out[i] = 2*a[i]",
File "/home/sgarcia/loopy/loopy/kernel/creation.py", line 1067, in
make_kernel
from loopy.target.pyopencl import PyOpenCLTarget
File "/home/sgarcia/loopy/loopy/target/pyopencl/__init__.py", line
32, in <module>
from loopy.target.opencl import OpenCLTarget
File "/home/sgarcia/loopy/loopy/target/opencl/__init__.py", line 50,
in <module>
_register_types()
File "/home/sgarcia/loopy/loopy/target/opencl/__init__.py", line 35,
in _register_types
from loopy.target.opencl.compyte.dtypes import (
ImportError: No module named compyte.dtypes
The loopy package do not have loopy.target.opencl.compyte in the sources.
Am I missing somethings ?
Thanks a lot. (for helping but overall for that packages).
Samuel
--
Samuel Garcia
Centre de Recherche en Neurosciences de Lyon
Université Lyon 1 - CNRS UMR5292 - INSERM U1028
50, Avenue Tony Garnier
69007 LYON
http://crnl.univ-lyon1.fr
Hello,
I am trying to get pyopencl installing with pip (as a dependency in my own distribution). However I get "ImportError: No module named numpy” during setup.
This seems to be an issue with organisation of numpy installation - see here http://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installa….
Installation works perfectly if I do “pip install numpy” before “pip install pyopencl”.
So, apparently there is a workaround for setuptools using:
__builtins__.__NUMPY_SETUP__ = False
I also noticed that in the current setup.py there is only setup_requires=[“numpy”], whereas it should also be in install_requires.
After modifying setup.py as attached “pip install -e pyopencl” (where I am pointing at my local source) seems to work fine and installs numpy and other dependencies.
If this is a sensible way to fix this issue, I’ll be happy to push/pull_request these changes.
Thanks….
Tim
Hi all,
I would like to draw your attention to a workshop that might be of
interest to at least some of you:
http://www.sable.mcgill.ca/array/
The point of the workshop is to provide a forum to discuss tools,
abstractions, and languages for high-performance computation on
arrays. Much of what PyOpenCL and PyCUDA provide is fast computation on
arrays along with code generation, and so I'm convinced that more than
one of you is working on tools and abstractions to make these types of
computations easier. I think it'd be fun to share and discuss what we
all have come up with.
I attended last year's edition in Edinburgh as somewhat of an outsider,
and I had a lot of fun.
(Full Disclosure: I'm on the program committee this year, so I'm not
entirely unbiased.)
Looking forward to seeing many of you in Portland!
Andreas