Closed alexzhang2010 closed 6 years ago
In order to use pyq in a Jupyter notebook, you need to install pyq-kernel. See https://pypi.python.org/pypi/pyq-kernel.
pip install pyq-kernel
pyq -m pyq.kernel install
Alternatively, if you don't need to interact with the kernel via kdb+ IPC, you can simply locate your main kernel.json file (e.g. using the jupyter kernelspec list
command) end replace "python" with "pyq" in the "argv" list.
unfortunately, installing pyq-kernel does not help. This issue seems have something to do with anaconda 5.0. I downgraded it to anaconda 4.4 (with python 3.6.3, pyq 4.1.2) and it started working.
How do you get Anaconda 5.0? I am looking at our recent Travis build https://travis-ci.org/KxSystems/pyq/jobs/305481268 and we seem to pick up conda-4.3.30.
@abalkin anaconda distribution is 5.0.1, but conda package is... different. Different versions of anaconda.
@alexzhang2010 when you were using anaconda 5 based virtualenv, after you installed the pyq-kernel, did you change kernel from Python 3.6 to PyQ 3 kernel? Error message you were getting means, that most likely Python 3.6 kernel was used.
To help you troubleshoot -- please provide outputs of:
jupyter kernelspec list
And attach the .ipynb file with the notebook which failed to work.
https://www.anaconda.com/download/
The latest build is 5.0.1 released on 10/25
When I was using anaconda 4.4, I don’t have to install pyq-kernel. I just used python 3.6 kernel and import pyq works fine.
After I upgraded to anaconda 5.0.1, I got the same symbol error both with PyQ 3 kernel and with Python 3 kernel.
@alexzhang2010 error you're getting is expected and is not a problem. In order to use IPython Notebooks with PyQ, you need to install ipython-kernel as suggested above by @abalkin, and use PyQ kernel for your notebook. While there you will have access to %q
single line magic and %%q
multiline magic.
With anaconda 5.0.1, I installed pyq-kernel and used the pyq3 kernel, I ran into the same error.
Why it works with anaconda 4.4 even without installing pyq-kernel?
From: Aleks Bunin [mailto:notifications@github.com] Sent: Monday, November 27, 2017 10:34 PM To: KxSystems/pyq Cc: Zhang, Ray; Mention Subject: Re: [KxSystems/pyq] symbol error while running "pyq -m notebook " (#36)
@alexzhang2010https://github.com/alexzhang2010 error you're getting is expected and is not a problem. In order to use IPython Notebooks with PyQ, you need to install ipython-kernelhttps://pypi.python.org/pypi/pyq-kernel as suggestedhttps://github.com/KxSystems/pyq/issues/36#issuecomment-347343938 above by @abalkinhttps://github.com/abalkin, and use PyQ kernel for your notebook. While there you will have access to %q single line magic and %%q multiline magic.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/KxSystems/pyq/issues/36#issuecomment-347403562, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADp9u_WT6LhyReSKpHGrw36ueoLZ5W_hks5s639FgaJpZM4QsWCI.
I am installed pyq 4.1.2 succesfully on redhat 2.7. When I run pyq from the shell, everything works fine.
But when I launched the notebook with "pyq -m notebook ", and tried to the above code from notebook. I received the following error (also see the attached screen shot)