qtconsole icon indicating copy to clipboard operation
qtconsole copied to clipboard

ArrayFire Package works in iPython Terminal but fails in QtConsole

Open kdbarajas opened this issue 7 years ago • 2 comments

Within ArrayFire, I'm able to get a read out the CUDA device information. From terminal, using python or iPython I'm able to get the following print out verifying that it is able to read the CUDA toolkit I installed. After running some tests, I can confirm that ArrayFire works within the python and iPython console as shown in the example below as it correctly reads the CUDA toolkit.

$ ipython
Python 3.6.5 |Anaconda, Inc.| (default, April 29 2018, 16:14:56) 
Type "help", "copyright", "credits" or "license" for more information.
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

>>> import arrayfire as af
>>> af.device_info()
{'device': 'GeForce_GTX_1080', 'backend': 'CUDA', 'toolkit': 'v9.1', 'compute': '6.1'}

However, when I try to use the Jupyter QtConsole within Spyder or from terminal I find that I am unable to get ArrayFire to connect to the CUDA toolkit and the tests fail as shown below by 'toolkit' returning an empty version line indicated by 'v'.

$ jupyter qtconsole
Jupyter QtConsole 4.3.1
Python 3.6.5 |Anaconda, Inc.| (default, April 29 2018, 16:14:56) 
Type "help", "copyright", "credits" or "license" for more information.
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import arrayfire as af
In [2]: af.device_info()
Out[2]: {'device': 'GeForce_GTX_1080', 'backend': 'CUDA', 'toolkit': 'v', 'compute': '6.1'}

Attempts:

  • Uninstalled and reinstall QtConsole.
  • I have checked that ArrayFire works in both Python console and iPython console.
  • Tried QtConsole from within Spyder and from Terminal, but ArrayFire fails at both.
  • Checked that the $PATH are the same between the QtConsole and iPython console.

Any help clarifying the problem would be appreciated

kdbarajas avatar Jun 19 '18 18:06 kdbarajas

Check other environment variables besides PATH. Also check sys.executable in Python to ensure that you're using the same Python installation in the terminal and in the Qt console.

takluyver avatar Jun 19 '18 18:06 takluyver

I've checked sys.exectuable and QtConsole is running the same Python installation as the iPython and Python console in terminal. The environmental variables are almost identical with the exception of a few added paths that seem to be related to Jupyter near the bottom of the list. However, the main paths within environmental variables are the same.

kdbarajas avatar Jun 19 '18 21:06 kdbarajas