Closed jljs closed 6 years ago
Yes, there is a workaround. You need to symlink python executable to pyq executable.
As we use virtual environments, we amended virtualenvironment creation process with following lines, depending on Python version:
For Python 2 we use:
(cd ${VIRTUAL_ENV}/bin && ln -sfn pyq python)
for Python 3 we use:
(cd ${VIRTUAL_ENV}/bin && ln -sfn pyq python3)
Thank you. I followed your instructions above. But I still get the following error when running it in PyCharm.
/home/svc_tpmdb_dev/.conda/envs/py36an440/bin/python3 /home/svc_tpmdb_dev/.conda/envs/py36an440/bin/pyq
File "/home/svc_tpmdb_dev/.conda/envs/py36an440/bin/pyq", line 1
SyntaxError: Non-UTF-8 code starting with '\x96' in file /home/svc_tpmdb_dev/.conda/envs/py36an440/bin/pyq on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Process finished with exit code 1
Thanks
Jeffrey
Sorry. I have resolved the issue. Thank you very much. Your instructions above work.
Thanks
Jeffrey
It looks like you have not configured PyCharm to run pyq as python executable. Go to Preferences and look for "Project Interpreter" . It should be set to the file (python or python3) that you symlinked to pyq.
Questions
Which operating system are you using (if Linux, please provide flavour of it, i.e RedHat, CentOS or Ubuntu), is it 32-bit, or 64-bit?
Red Hat Enterprise Linux Server release 6.9 (Santiago)
Which version of PyQ are you running? You can use pyq --versions or pip list | grep pyq.
Which version of kdb+ are you using, is it 32-bit or 64-bit?
If on 64-bit, is your QLIC set? Please provide output env | grep QLIC on linux/macOS, or set|grep QLIC on Windows.
Did you use virtual environment to install PyQ? If not, why?
Yes with Anaconda
Where is your QHOME? Please provide output env | grep QHOME on linux/macOS, or set|grep QHOME on Windows.
Do you use Conda? If so, what version?
Yes. conda 3.14.1
Steps to reproduce the issue
Is there a way to run PyQ as an interpreter in PyCharm? I am trying to run PyQ as an interpreter in PyCharm, but I got the following error
During handling of the above exception, another exception occurred:
Expected result
Actual result
Workaround
If you know workaround, please provide it here.