# How to install PyQ at RHEL

**URL:** <https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [January 4, 2017, 7:13am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444 "2017-01-04T07:13:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hzadonis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hzadonis](https://forum.kx.com/u/hzadonis)\
**Post date:** [January 4, 2017, 7:13am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/1 "2017-01-04T07:13:00Z")

</div>

Hi, Dear all:  
&nbsp; According to the PyQ installation guide. the command: “pip install \<path to the source\>” can be used to install PyQ. But I got error message and failed.

[root@ETAPP1 pyq-pyq-3.8.3]#pip install /home/et/Python-3.6.0/pyq-pyq-3.8.3

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Processing /home/et/Python-3.6.0/pyq-pyq-3.8.3

&nbsp; &nbsp; Complete output from command python setup.py egg\_info:

&nbsp; &nbsp; Traceback (most recent call last):

&nbsp; &nbsp; &nbsp; File “\<string\>”, line 1, in \<module\>

&nbsp; &nbsp; &nbsp; File “/tmp/pip-npfrv5hm-build/setup.py”, line 783, in \<module\>

&nbsp; &nbsp; &nbsp; &nbsp; \*\*metadata)

&nbsp; &nbsp; &nbsp; File “/home/et/Python-3.6.0/Lib/distutils/core.py”, line 108, in setup

&nbsp; &nbsp; &nbsp; &nbsp; \_setup\_distribution = dist = klass(attrs)

&nbsp; &nbsp; &nbsp; File “/tmp/pip-npfrv5hm-build/setup.py”, line 693, in \_\_init\_\_

&nbsp; &nbsp; &nbsp; &nbsp; \_Distribution.\_\_init\_\_(self, attrs)

&nbsp; &nbsp; &nbsp; File “/usr/local/lib/python3.6/site-packages/setuptools/dist.py”, line 318, in \_\_init\_\_

&nbsp; &nbsp; &nbsp; &nbsp; \_Distribution.\_\_init\_\_(self, attrs)

&nbsp; &nbsp; &nbsp; File “/home/et/Python-3.6.0/Lib/distutils/dist.py”, line 281, in \_\_init\_\_

&nbsp; &nbsp; &nbsp; &nbsp; self.finalize\_options()

&nbsp; &nbsp; &nbsp; File “/tmp/pip-npfrv5hm-build/setup.py”, line 733, in finalize\_options

&nbsp; &nbsp; &nbsp; &nbsp; path = os.path.join(os.getenv(‘VIRTUAL\_ENV’), ‘q’)

&nbsp; &nbsp; &nbsp; File “/home/et/Python-3.6.0/Lib/posixpath.py”, line 78, in join

&nbsp; &nbsp; &nbsp; &nbsp; a = os.fspath(a)

&nbsp; &nbsp; TypeError: expected str, bytes or os.PathLike object, not NoneType

&nbsp; &nbsp;&nbsp;

&nbsp; &nbsp; ----------------------------------------

Command “python setup.py egg\_info” failed with error code 1 in /tmp/pip-npfrv5hm-build/

[root@ETAPP1 pyq-pyq-3.8.3]# more /tmp/pip-npfrv5hm-build/

\*\*\* /tmp/pip-npfrv5hm-build/: directory \*\*\*

&nbsp; Do you have any suggestions? Thanks v m!

Zheng

---

<div class="post-metadata">

**Author:** ![Alexander\_Belop](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@Alexander\_Belop](https://forum.kx.com/u/Alexander_Belop)\
**Post date:** [January 6, 2017, 12:41am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/2 "2017-01-06T00:41:00Z")

</div>

On Wednesday, January 4, 2017 at 2:46:46 AM UTC-5, [hzad...@gmail.com](mailto:hzad...@gmail.com) wrote:

> &nbsp; According to the PyQ installation guide. the command: “pip install \<path to the source\>” can be used to install PyQ. But I got error message and failed.

This would typically happen if your system python is linked statically. Try running ldd command with your python executable as an argument. &nbsp;You should see something like

$ ldd $(which python)

linux-vdso.so.1 =\> &nbsp;(0x00007ffdfcf59000)

libpython2.7.so.1.0 =\> \<…\>/lib/libpython2.7.so.1.0 (0x00007f6a8c639000)

libpthread.so.0 =\> /lib64/libpthread.so.0 (0x00000034f7000000)

libdl.so.2 =\> /lib64/libdl.so.2 (0x00000034f6400000)

libutil.so.1 =\> /lib64/libutil.so.1 (0x0000003507400000)

libm.so.6 =\> /lib64/libm.so.6 (0x00000034f6c00000)

libc.so.6 =\> /lib64/libc.so.6 (0x00000034f6800000)

/lib64/ld-linux-x86-64.so.2 (0x00000034f6000000)

If you don’r see libpythonX.Y.so in the list of libraries - you need to recompile your python with --enable-shared option passed to the configure script.

---

<div class="post-metadata">

**Author:** ![sashk1](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sashk1](https://forum.kx.com/u/sashk1)\
**Post date:** [January 7, 2017, 1:06am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/3 "2017-01-07T01:06:00Z")

</div>

Zheng,

&nbsp;Please try one of these two workarounds:

1. Use virtualenv for installing PyQ, i.e.:

> $ python3.6 -m venv path/to/venv
> 
> $ source path/to/venv/bin/activate
> 
> $ pip install path/to/pyq

1. If you don’t want to use virtual environment, pass VIRTUAL\_ENV variable for setup to pass:

> $ VIRTUAL\_ENV=1 pip install path\_to\_pyq

This issue has been fixed internally and we should release patch shortly (probably later next week).&nbsp;

Please note, you need to have kdb+ installed on your system either in $HOME/q or $QHOME variable should be set to the path of kdb+.

-Aleks

---

<div class="post-metadata">

**Author:** ![hzadonis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hzadonis](https://forum.kx.com/u/hzadonis)\
**Post date:** [January 10, 2017, 1:54am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/4 "2017-01-10T01:54:00Z")

</div>

Hi, Sasha:  
&nbsp; Many thanks!

&nbsp; Yes, I can’t find the libpythonX.Y.so at my site. So recompile with you mentioned parameter, and I also add the LD\_LIBRARY\_PATH. Then it can be found, such as:

&nbsp; [root@ETAPP1 Python-3.6.0]# ldd $(which python)  
linux-vdso.so.1 =\> &nbsp;(0x00007ffcb6bf7000)

libpython3.6m.so.1.0 =\> /home/et/Python-3.6.0/libpython3.6m.so.1.0 (0x00007f6f2d327000)

libpthread.so.0 =\> /lib64/libpthread.so.0 (0x00007f6f2d0f4000)

libdl.so.2 =\> /lib64/libdl.so.2 (0x00007f6f2cef0000)

libutil.so.1 =\> /lib64/libutil.so.1 (0x00007f6f2cced000)

libm.so.6 =\> /lib64/libm.so.6 (0x00007f6f2c9ea000)

libc.so.6 =\> /lib64/libc.so.6 (0x00007f6f2c629000)

/lib64/ld-linux-x86-64.so.2 (0x00005617ece7f000)

? 2017?1?6??? UTC+8??8:41:45?Sasha???

>

---

<div class="post-metadata">

**Author:** ![hzadonis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hzadonis](https://forum.kx.com/u/hzadonis)\
**Post date:** [January 10, 2017, 2:53am UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/5 "2017-01-10T02:53:00Z")

</div>

Hi, Aleks:  
&nbsp; Thanks for your help!

&nbsp; Yes, it’s a virtual env. I followed your steps, got a message like:

&nbsp;&nbsp;[root@ETAPP1 Python-3.6.0]# python3.6 -m venv /home/et/Python-3.6.0/venv

&nbsp; [root@ETAPP1 Python-3.6.0]# source /home/et/Python-3.6.0/venv/bin/activate  
&nbsp; (venv) [root@ETAPP1 Python-3.6.0]# pip install /home/et/Python-3.6.0/pyq-pyq-3.8.3

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Processing ./pyq-pyq-3.8.3

Collecting pytest\>=2.6.4 (from pyq==3.8.3)

&nbsp; Could not fetch URL [https://pypi.python.org/simple/pytest/:](https://pypi.python.org/simple/pytest/:) There was a problem confirming the ssl certificate: Can’t connect to HTTPS URL because the SSL module is not available. - skipping

&nbsp; Could not find a version that satisfies the requirement pytest\>=2.6.4 (from pyq==3.8.3) (from versions: )

No matching distribution found for pytest\>=2.6.4 (from pyq==3.8.3)

&nbsp; Why my pyq=3.8.3 does not match pytest\>=2.6.4

Zheng

? 2017?1?7??? UTC+8??8:10:36?Aleks Bunin???

> Zheng,
> 
> &nbsp;Please try one of these two workarounds:
> 
> 1. Use virtualenv for installing PyQ, i.e.:
> 
> > $ python3.6 -m venv path/to/venv
> > 
> > $ source path/to/venv/bin/activate
> > 
> > $ pip install path/to/pyq
> 
> 1. If you don’t want to use virtual environment, pass VIRTUAL\_ENV variable for setup to pass:
> 
> > $ VIRTUAL\_ENV=1 pip install path\_to\_pyq
> 
> This issue has been fixed internally and we should release patch shortly (probably later next week).&nbsp;
> 
> Please note, you need to have kdb+ installed on your system either in $HOME/q or $QHOME variable should be set to the path of kdb+.
> 
> -Aleks

---

<div class="post-metadata">

**Author:** ![Alexander\_Belop](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@Alexander\_Belop](https://forum.kx.com/u/Alexander_Belop)\
**Post date:** [January 10, 2017, 7:25pm UTC](https://forum.kx.com/t/how-to-install-pyq-at-rhel/11444/6 "2017-01-10T19:25:00Z")

</div>

On Tuesday, January 10, 2017 at 2:49:31 AM UTC-5, [hzad...@gmail.com](mailto:hzad...@gmail.com) wrote:

> Collecting pytest\>=2.6.4 (from pyq==3.8.3)
> 
> &nbsp; Could not fetch URL https://pypi.python.org/simple/pytest/: There was a problem confirming the ssl certificate: Can’t connect to HTTPS URL because the SSL module is not available. - skipping
> 
> &nbsp; Could not find a version that satisfies the requirement pytest\>=2.6.4 (from pyq==3.8.3) (from versions: )
> 
> No matching distribution found for pytest\>=2.6.4 (from pyq==3.8.3)
> 
> &nbsp; Why my pyq=3.8.3 does not match pytest\>=2.6.4

The root of this problem is shown a few lines above: “the SSL module is not available.” &nbsp;Please make sure you have all the necessary dependencies to build python. Try

```
$ sudo yum install yum-utils$ sudo yum-builddep python3

```

&nbsp;See \<[https://docs.python.org/devguide/setup.html#build-dependencies\](https://docs.python.org/devguide/setup.html#build-dependencies%5C)\> for details.
