Closed karthikmurali closed 6 years ago
Please read installing into a virtual environment instructions carefully. You need to install kdb+ in $VIRTUAL_ENV/q and your QHOME should be either unset or set to $VIRTUAL_ENV/q.
If it still does not work, please run pip install in verbose mode
pip install -vvv pyq
and post the results.
I installed again - $QHOME is in $VIRTUAL_ENV/q
Yes - q is in $VIRTUAL_ENV/q (pyq4) $ echo $QHOME /home/user/pyq4/q (pyq4) $ echo $VIRTUAL_ENV /home/user/pyq
Output of pip install -i $INTERNAL_PYPI_URL --trusted_host $INTERNAL_PYPI_HOST -vvv pyq
Collecting pyqââââââââââââ 1 location(s) to search for versions of pyq:
Successfully installed pyq-4.1.4
Did you resolve your issue?
No , the same issue still exists. It installed successfully, but fails looking for 32bit q instead of 64bit.
You really have to tell us more than that. What command do you run? What output do you expect and what output do you get? One problem I can see in your log is this:
Using cached wheel link: file:///home/user/.cache/pip/wheels/.../pyq-4.1.4-cp36-cp36m-linux_x86_64.whl
You have a .whl file left from a command that you don't show us.
Also, we have no way to know what $INTERNAL_PYPI_URL or $INTERNAL_PYPI_HOST variables are.
If you prefer following someone else's instructions instead of those at code.kx.com, you should ask those who instructed you for help.
Sorry, I thought I gave you all this information in the first comment - the exact commands I run are below. I have tried to stay pretty close to what is at code.kx.com. The main differences are , a) public pypi is blocked, so we install from a pypi within the corporate network b) there is already a directory with the kdb installation and we copy q from there into the virtual env. $INTERNAL_PYPI_HOST and $INTERNAL_PYPI_URL are just pointers to the internal pypi installation which is just a copy of public pypi.
What I expect: When I run pyq - it starts up pointing to l64/q
What actually happens: I cannot start pyq, it looks for l32/q which is not there and fails $ source /home/user/pyq4/bin/activate (pyq4) $ pyq qbinpath = /home/user/pyq4/q/l32/q qbinpath = /home/user/pyq4/q/l32/q qbinpath = /home/user/pyq4/q/l32/q qbinpath = /home/user/q/l32/q
Exact commands I run
pip install -i $INTERNAL_PYPI_URL --trusted_host $INTERNAL_PYPI_HOST -target=/tmp/pyqenvtmp virtualenv
python3 /tmp/pyqenvtmp/virtualenv.py /home/user/pyq4
rm -rf /tmp/pyqenvtmp
source $/home/user/pyq4/bin/activate mkdir $VIRTUAL_ENV/q cp -r $KDB_DIR/* $VIRTUAL_ENV/q //$KDB_DIR is where 64bit q is stored echo "export QHOME=$VIRTUAL_ENV/q" >> $VIRTUAL_ENV/bin/activate echo "export QLIC=$VIRTUAL_ENV/q/lic/licfile" >> $VIRTUAL_ENV/bin/activate pip install -i $INTERNAL_PYPI_URL --trusted_host $INTERNAL_PYPI_HOST pyq
OK, we are getting somewhere, but you still did not provide a clean build log. Please run
pip install -vvv --no-binary pyq pyq
You don't have to post the entire story of finding the sources on pypi. Try to find the relevant lines.
You should be looking for a line with -DQARCH in it. If it shows l32 it means you are building pyq with a 32-bit python. Check what your pip command uses:
head -1 $(which pip)
I was just able to fix this by running pip with --no-cache-dir. Thank you for the pointer about the cached wheel file. I think a previous attempt at installation had left some files around which was being picked up by this.
Thanks a lot for your help!
Questions
[x] 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?
[x] 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
:[x] Which version of kdb+ are you using, is it 32-bit or 64-bit?
[x] If on 64-bit, is your
QLIC
set? Please provide outputenv | grep QLIC
on linux/macOS, orset|grep QLIC
on Windows.[x] Did you use virtual environment to install PyQ? If not, why?
[x] Where is your
QHOME
? Please provide outputenv | grep QHOME
on linux/macOS, orset|grep QHOME
on Windows.[x] Do you use Conda? If so, what version?
Steps to reproduce the issue
We are trying out pyq and running into installation errors – I am trying to point it to the 64bit commercial version, but it always installs the pyq components for the 32bit and then cannot find the 32bit q executable.
but this works just fine
this is the snippet of code used to create the virtualenv
I also tried running get_q_arch( os.environ[‘QHOME’]) from setup.py within the virtual environment and it gives me l64
Expected result
pyq should run with 64bit q
Actual result
pyq looks for 32bit q
Workaround
If you know workaround, please provide it here.