Abhinav Choudhury
Abhinav Choudhury

Reputation: 329

PYQ ImportError: No module named pyq

I am trying to install pyq on 64 bit Ubuntu. I have a 64 bit KDB+ license. I followed the steps given in Pyq Installation for installing in a licensed Kdb+.

I created a virtual environment.

pip install virtualenv
mkdir python-virtual-environments && cd python-virtual-environments
pyvenv env
source env/bin/activate

Unzipped the kdb+ 64 bit file

mkdir -p ${VIRTUAL_ENV}/q && unzip path/to/m64.zip -d ${VIRTUAL_ENV}/q

copied the license and installed pyq

git clone https://github.com/enlnt/pyq.git
pip install <path to the source>

I have also done the same process by creating a virtual environment using Conda.

In both cases, when I run pyq in the Terminal, I am getting the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pyq
'2017.10.11T06:10:31.641 python

Please help.

Also when I try to install pyq using

pip install -i https://pyq.enlnt.com --no-binary pyq pyq`

I get

Requirement already satisfied: pyq in /usr/local/lib/python2.7/dist-packages

Upvotes: 0

Views: 763

Answers (1)

Alexander Belopolsky
Alexander Belopolsky

Reputation: 2268

First, uninstall pyq by running

pip uninstall pyq

Make a copy of the list of paths that this command displays as being removed. You will need it to troubleshoot later.

Make sure you have python shared libraries installed. See Installing PyQ on Ubuntu 16.04

Run

pip install pyq

Recently published versions don't require the extra pip options.

If this does not give you a working pyq executable, look at the list of paths that you saved during uninstall find the full path to the parent directory of the pyq package. Set the PYTHONPATH environment variable to that path.

BTW, the message that you reported,

Requirement already satisfied: pyq in /usr/local/lib/python2.7/dist-packages

suggests that you (or someone else) installed pyq directly into local python installation, not into a virtual environment. Also the /usr/local prefix indicates that you have a custom python installation which may be the cause of your problem.

Upvotes: 1

Related Questions