KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
191 stars 49 forks source link

run pyq error, after pip install pyq #113

Closed fouvy closed 4 years ago

fouvy commented 5 years ago

Questions

Steps to reproduce the issue

setting QHOME in ~/.bashrc run: sudo pip install pyq pyq

Expected result

run a python shell

Actual result

error in /q/python.q line 6: run:py`$pyq_executable

Workaround

I solved thie problem by run following code:

sudo -E bash -c 'pip install pyq'

It seems env variable doesn't share with sudoer. If you know workaround, please provide it here.

sashkab commented 5 years ago

Please show full output.

fouvy commented 5 years ago

full output is:

(python36) eam238@eam238-System-Product-Name:~$ pyq
'2019.06.19T14:37:46.689 pyq_executable
  [2]  /q/python.q:5: run:py`$pyq_executable
fouvy commented 5 years ago

Another method to solve this problem:

git clone https://github.com/kxsystems/pyq.git
sudo -E bash -c 'pip install ./pyq'
sashkab commented 5 years ago

we don't recommend using sudo pip install pyq.

any reason you're cloning repository and not installing it with pip install pyq?

fouvy commented 5 years ago

cuz, install packages for multi users ...

sashkab commented 5 years ago

using virtual environment works perfectly fine for multiple users. we've been using this method for years with zero issues, no root user was required. Each virtual environment can have different version not only kdb+ installed, but PyQ as well.

github-actions[bot] commented 4 years ago

Stale issue message