question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named 'pyq' in macOs Catalina 10.15.4

See original GitHub issue

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?

    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 version python -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 output env | grep QLIC on linux/macOS, or set|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 output env | grep QHOME on linux/macOS, or set|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

Screenshot 2020-05-12 at 8 48 24 PM Screenshot 2020-05-12 at 8 50 33 PM ## Workaround In the same time, "pyq" works perfectly. Screenshot 2020-05-12 at 9 05 35 PM

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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sashkabcommented, May 12, 2020

Try running same command I did:

QHOME=$VIRTUAL_ENV/q $VIRTUAL_ENV/q/m64/q

And let me know if that works. Otherwise, I’d suggest to:

  1. Run brew upgrade.

  2. Re-create new virtual env:

    cd ~
    python3.7 -mvenv pyq
    source pyq/bin/activate
    mkdir $VIRTUAL_ENV/q
    unzip path/to/kdb.zip -d $VIRTUAL_ENV/q
    python3.7 -mpip install pyq
    
  3. Re-run your commands:

    pyq --versions
    QHOME=$VIRTUAL_ENV/q $VIRTUAL_ENV/q/m64/q
    
0reactions
xiangpeng2008commented, May 12, 2020

Hi @sashkab , QHOME=$VIRTUAL_ENV/q $VIRTUAL_ENV/q/m64/q doesn’t work. But the brew upgrade and re-create virtual env solves the problem perfectly ! Thanks a lot !

Read more comments on GitHub >

github_iconTop Results From Across the Web

q can't find python package in virtual env · Issue #132 - GitHub
It looks like python tries to look for package from system instead of inside virtual env. Meanwhile, pyq has no problem to import...
Read more >
PYQ ImportError: No module named pyq - Stack Overflow
First, uninstall pyq by running pip uninstall pyq. Make a copy of the list of paths that this command displays as being removed....
Read more >
Xcode 11.2 has broken python pip | Apple Developer Forums
After installing XCode 11.2 on my 2 Macs (one iMac and other Macbook), both using MacOS Catalina 10.15. 1, Python is broken. Any...
Read more >
PsychoPy3 ERROR crash upon opening (MacOS)
Hi all, I downloaded PsychoPy3 (Mac Catalina 10.15.3) and used it normally after a few ... ModuleNotFoundError: No module named 'psychopy'.
Read more >
How to install pyroot on macOS Catalina (10.15.7)? - ROOT
This is macOS Catalina (10.15.7) on a Mac Pro. I have used Root for many years, but am just starting ... ImportError: No...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found