Closed grokpronoia closed 6 years ago
Please follow Installing into a virtual environment instructions. The kdb+ zip archive should be extracted in ${VIRTUAL_ENV}
( the free edition) or ${VIRTUAL_ENV}/q
after the virtual environment has been activated and before pip install
.
You cannot have both 32-bit and 64-bit PyQ in the same environment, but if you use universal python binary, you can have your environments built from a common parent.
@marrowgari - how did you get Python 3.6 on your system? We recommend using brew
with a special tap. See Brewing Universal Python.
@abalkin those are the instructions I was following. Everything seemed to work fine, as you can see from my code above, except starting the PyQ process. I've tried going back and reinstalling everything a few times, even re-downloading the 32-bit version and extracting in the virtual environment but it keeps throwing the same error...
~ master*
❯ pyq
Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/wiki/Tutorials
To exit, type \\
To remove this startup msg, edit q.q
'2017.11.27T11:40:22.059 dlopen(/Library/Frameworks/Python.framework/Versions/3.6/bin/python3:, 10): image not found
[4] /Users/marrowgari/q/p.k:3: (`p 2:(`p_init;1))python_dll
In regards to your other question about Python, I installed it using brew install python3
, which you can see below...
~ master*
❯ brew list
gcc heroku libmpc openssl rlwrap
gdbm heroku-node mpfr openssl@1.1 sqlite
git icu4c node python3 wget
gmp isl numpy readline xz
@marrowgari - brew install python3
will install 64bit python which is not compatible with the 32bit edition of kdb+.
I have just tried installing 64bit pyq on my macOS 10.12.6 machine and it all worked fine. How did you create your virtual environment?
❯ virtualenv /Users/marrowgari/pykdb Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
When you created virtual environment you did not use brewed python. virtualenv used python found in your path, which seems not one from the homebrew. In order to supply correct Python to the virtualenv, use following command:
virtualenv -p /usr/local/opt/python36/bin/python3.6 /Users/marrowgari/pyq32
Replace /usr/local/opt/python36/bin/python3.6
with the path to your brewed python.
If that doesn't work, please provide output of
brew info python3 python36
@sashkab not using the correct version of python was the problem. Even though I had a brewed version of python on my machine, I had also downloaded the python3.6 framework from python.org. To fix the problem I had to completely remove python off of my system then re-install using brew with a special tap, Brewing Universal Python, as @abalkin mentioned above. Once the old versions of python were removed and the brewed version was the only one remaining on my system the rest of the installation went smoothly. Thank you for the help!
@marrowgari Something else was wrong with your setup, as I just performed test installation on macOS with Python downloaded from the python.org. Just in case, this was fresh installation of macOS 10.13.1, with no Hombrew installed.
$ python3 -m pip install virtualenv
Collecting virtualenv
Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
100% |████████████████████████████████| 1.8MB 609kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-15.1.0
$ python3 -m virtualenv pyq
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/b/pyq/bin/python3
Also creating executable in /Users/b/pyq/bin/python
Installing setuptools, pip, wheel...done.
$ source pyq/bin/activate
(pyq) $ mv ~/Downloads/q $VIRTUAL_ENV/
(pyq) $ pip install pyq
Collecting pyq
Downloading pyq-4.1.2.tar.gz (94kB)
100% |████████████████████████████████| 102kB 3.0MB/s
Building wheels for collected packages: pyq
Running setup.py bdist_wheel for pyq ... done
Stored in directory: /Users/b/Library/Caches/pip/wheels/ca/30/e1/f0cf8237ad1eb6691c5adbe753141249e78620bfb2decae1c3
Successfully built pyq
Installing collected packages: pyq
Successfully installed pyq-4.1.2
(pyq) $ pyq --versions
Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/q
To exit, type \\
To remove this startup msg, edit q.q
PyQ 4.1.2
KDB+ 3.5 (2017.11.30) m32
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
(pyq) $ brew
-bash: brew: command not found
Using python 3.6. I have 2 versions of kdb installed on my system; the free 32-bit version and the 64-bit personal edition. I've successfully installed PyQ using pip3...
When I enter the pyq command it throws the following error...
I've also tried using Virtualenv. Following the steps here...
I've created the virtual environment and activated it...
Since I have a license for my 64-bit personal edition I create a directory for it first...
and check to make sure that it's been unzipped and installed properly...
I copy my kdb license to the q folder previously created in the virtualenv...
❯ cp /Users/marrowgari/downloads/m64/kc.lic /Users/marrowgari/pykdb/q
and check to make sure it's been added...
I install PyQ in the virtualenv...
However, when I try to start an interactive session it throws the following error...
Any help on resolving this would be greatly appreciated. Thank you.