No module named 'pyq' in macOs Catalina 10.15.4
See original GitHub issueQuestions
-
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?
macOS Catalina, 10.15.4, 65-bit
-
Which version of PyQ are you running? Please provide output of
pyq --versions
, if PyQ isn’t operational, please provide Python interpreter version and PyQ versionpython -V; python3 -V; pip list | grep pyq
:4.2.1
-
Which version of kdb+ are you using, is it 32-bit or 64-bit?
3.6 64-bit
-
If on 64-bit, is your
QLIC
set? Please provide outputenv | grep QLIC
on linux/macOS, orset|grep QLIC
on Windows.yes, QLIC=/Users/xiangpeng/venv37/q
-
-
Did you use virtual environment to install PyQ? If not, why?
- yes
-
Where is your
QHOME
? Please provide outputenv | grep QHOME
on linux/macOS, orset|grep QHOME
on Windows. QHOME=/Users/xiangpeng/venv37/q -
Do you use Conda? If so, what version?
no
-
Output of
ls -la $VIRTUAL_ENV/q
(venv37) iMac /Users/xiangpeng $ ls -la venv37/q total 136 drwxr-xr-x 14 xiangpeng staff 448B May 12 20:20 ./ drwxr-xr-x 13 xiangpeng staff 416B Apr 13 16:38 …/ -rw-r–r–@ 1 xiangpeng staff 3.2K May 11 23:28 README.txt -rw-r–r–@ 1 xiangpeng staff 366B May 11 23:28 kc.lic drwxr-xr-x 4 xiangpeng staff 128B May 12 20:20 m64/ -rw-r–r-- 1 xiangpeng staff 516B May 12 20:20 p.k -rw-r–r-- 1 xiangpeng staff 155B May 12 20:20 pyq-config.q -rw-r–r-- 1 xiangpeng staff 1.1K May 12 20:20 pyq-operators.q -rw-r–r-- 1 xiangpeng staff 32B May 11 23:28 pyq-print.q -rwxr-xr-x 1 xiangpeng staff 319B May 12 20:20 python.q* -rw-r–r–@ 1 xiangpeng staff 22K May 11 23:28 q.k -rw-r–r–@ 1 xiangpeng staff 5.3K May 11 23:28 s.k -rw-r–r–@ 1 xiangpeng staff 821B May 11 23:28 sp.q -rw-r–r–@ 1 xiangpeng staff 150B May 11 23:28 trade.q -
output of
python3 -mpip list | grep pyq
(venv37) iMac /Users/xiangpeng $ python3 -mpip list | grep pyq pyq 4.2.1
Steps to reproduce the issue
/Users/xiangpeng/venv37/q q)p)1
Expected result
1
Actual result
Traceback (most recent call last): File “<string>”, line 1, in <module> ModuleNotFoundError: No module named ‘pyq’ 'python



If you know workaround, please provide it here. With help of @sashkab in https://github.com/KxSystems/pyq/issues/132#issuecomment-628620923, there’s an issue lying python3.7, the workaround to downgrade python3.6 works perfectly.
brew install sashkab/python/python@3.6
/usr/local/opt/python@3.6/bin/python3.6 -mpip install -U virtualenv==16.7.9
/usr/local/opt/python@3.6/bin/python3.6 -mvirtualenv pyq
source pyq/bin/activate
python3.6 -mpip install -U pip setuptools wheel
unzip Downloads/m64.zip -d $VIRTUAL_ENV/q
cp q64/kc.lic $VIRTUAL_ENV/q/
python3.6 -mpip install pyq
QHOME=$VIRTUAL_ENV/q $VIRTUAL_ENV/q/m64/q
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Try running same command I did:
And let me know if that works. Otherwise, I’d suggest to:
Run
brew upgrade
.Re-create new virtual env:
Re-run your commands:
Hi @sashkab ,
QHOME=$VIRTUAL_ENV/q $VIRTUAL_ENV/q/m64/q
doesn’t work. But thebrew upgrade
and re-create virtual env solves the problem perfectly ! Thanks a lot !