PyOpenCL 2020.1 - Device side queue is unimplemented - python-3.x

I am facing an issue with pyopencl I never had before (see piece of code below)
the issue : Device side queue is unimplemented (clCreateCommandQueueWithProperties.c:93)
Have any of you faced this problem before ?
Do you have any idea wher it comes from ?
thanks in advance !
user#debian_9.5:~# pip3 freeze | grep pyopencl
pyopencl==2020.1
user#debian_9.5:~# python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyopencl as cl
>>> ctx = cl.create_some_context()
Choose platform:
[0] <pyopencl.Platform 'Portable Computing Language' at 0x7fb1fbfba020>
Choice [0]:0
Set the environment variable PYOPENCL_CTX='0' to avoid being asked again.
>>> print(ctx)
<pyopencl.Context at 0x55c1e9a87440 on <pyopencl.Device 'pthread-AMD Ryzen Threadripper 1950X 16-Core Processor' on 'Portable Computing Language' at 0x55c1ea017430>>
>>> queue = cl.CommandQueue(ctx)
Device side queue is unimplemented (clCreateCommandQueueWithProperties.c:93)
my setup is as folow : AMD-ryzen_1950X - debian_9.5 - python_3.5.3

solved doing :
user#debian_9.5:~# pip uninstall pyopencl && apt install python3-pyopencl

Related

Segmentation fault (core dumped) error when I try to import "face_recognition" in Python

So I just installed the 'face_recognition' module on my Jetson Nano. But, whenever I try to import it, it gives me this error:
Python 3.6.9 (default, Nov 25 2022, 14:10:45)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import face_recognition
**Segmentation fault (core dumped)**
I don't know why the program's crashing, as all I did was import the module in the terminal as well as in an IDE. Same result.
I tried importing other modules, but those work fine. The error only occurs when I import "face-recognition".
P.S: Sorry if this seems like a stupid/irrelevant doubt, I am very new to Linux and Python
Thank you in advance. :D

how to change tensorflow build version?

I am trying to build tensorflow from source following this link. Everything works good and I successfully build it based on master branch.
After I get the .whl package, I installed it and checked the version number. I get the following output:
Python 3.9.5 (default, Jun 18 2021, 13:37:06)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'2.9.0'
>>>
I get the version number as '2.9.0'. it makes sense as I build based on master branch and the current release is 2.8.0. However, I wish to customize the version number, for example, as 2.9.0--xxx so that I know what features I added into this build. I thought there should be a setup file or something I can change but I cannot find it. Any ideas? Thx!

Unable to import Pandas in IPython 6.5.0 console (Spyder)

After installing pandas am able to import in cmd as below :
C:\Users\me\Desktop\Django_Project>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>>
But when am importing pandas in Spyder in IPython 6.5.0 console I get below error:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 6.5.0 -- An enhanced Interactive Python.
c:\program files (x86)\python37-32\lib\site-packages\ipykernel\parentpoller.py:116: UserWarning: Parent poll failed. If the frontend dies,
the kernel may be left running. Please let us know
about your system (bitness, Python, etc.) at
ipython-dev#scipy.org
ipython-dev#scipy.org""")
In [1] : import pandas
Traceback (most recent call last):
File "<ipython-input-1-38d4b0363d82>", line 1, in <module>
import pandas
ModuleNotFoundError: No module named 'pandas'
In [2] :
Note: I have installed python in "C:\Users\me\AppData\Local\Programs\Python\Python37\" path and environment variables is set as "C:\Users\me\AppData\Local\Programs\Python\Python37;"
And I installed pandas using PIP
Please suggest the solution to resolve this issue.I have tried reinstalling the pandas package almost 6-7 times.
I think you should open anaconda command prompt by searching it in windows search bar . Now write there "conda install -c anaconda pandas" and try again to run the program

install wxpython for python2 and 3 on ubuntu

I am running Ubuntu 16 and have both python 2 and 3. I have downloaded wxpython and it works with the python2 interpreter but not 3. I get
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>>
and
Python 3.5.2 (default, Sep 14 2017, 22:51:06)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'wx'
What do I need to do to get installed for python 3?
A similar situation arises on Fedora 25, on which I was able to solve this. Your mileage may vary on Ubuntu.
First note that wxPython is available in two major versions, let's call them wx3 and wx4. You can identify your running version through import wx; print(wx.version()). The version string on Fedora 25 reads '3.0.2.0 gtk3 (classic)', i.e. a brand of wx3. On sourceforge these versions are known as 'wxPython' and 'wxPython4', and wxpython.org calls wx4 'phoenix'.
Inspecting the source code of wx3 you will note that wx3's syntax is incompatible with python3. Conversely, wx4 is compatible both with python2.7 and python3.
wx4 doesn't seem to be available on Fedora 25, therefore python3 can't run any wx out-of-the-box. Ubuntu may or may not have the same issue.
The following worked for me to install wx4 in a python3 virtual environment:
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/fedora-26 wxPython
I presume the answer to your question would be
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython
In case you need to port a (py2, wx3) application to python3, you would be wise creating an intermediate step: (py2, wx3) -> (py2, wx4) -> (py3, wx4), noting that (py3, wx3) is an impossibility.
To create the (py2, wx4) environment was more cumbersome for me, because the above pip install command fails to find header files when run using pip2.
What ended up working for me was to download the 4.0.0b2 source https://pypi.python.org/packages/bc/6f/f7bb525517557e1c596bf22ef3f242b87afaeab57c9ad460cb94b3b0714e/wxPython-4.0.0b2.tar.gz#md5=2e3716205da8f52d8039095d14534bf7
and follow the build instructions https://github.com/wxWidgets/Phoenix/blob/master/README.rst , from which I only used the build command python build.py dox etg --nodoc sip build .
After building, you need to tell your python2 where to find the wx4 library. I ended up doing that by creating a virtualenv, and creating a symbolic link like so:
/home/user/venv/lib/python2.7/site-packages/wx -> /home/user/downloads/wxPython/wxPython-4.0.0b2/wx
That latter directory cointaining the result of the build.

Use graphviz with python3

I try to draw a decision tree using the graphviz module, and it works fine with python2. Is there a way to use this module with python3?
Is there any other module that supports drawing decision trees in python3?
Did you install graphviz for python3? It works fine for me:
andi#sunnyside:~$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import graphviz
>>>
I am using debian though and there is no debian package for graphviz itself, you have to install it with pip3.

Resources