jupyter / qtconsole

Jupyter Qt Console
https://qtconsole.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
408 stars 199 forks source link

ArrayFire Package works in iPython Terminal but fails in QtConsole #287

Open kdbarajas opened 6 years ago

kdbarajas commented 6 years ago

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:

Any help clarifying the problem would be appreciated

takluyver commented 6 years ago

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.

kdbarajas commented 6 years ago

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.