devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
50 stars 15 forks source link

pyrfa only works if Python was built with --enable-shared #56

Open f4t opened 3 years ago

f4t commented 3 years ago

Hi,

Our Python package is built without --enable-shared flag and therefore doesn't produce the libpython3.6m.so.1.0 shared library.

Importing PyRFA gives:

(venv) [vagrant@centos7-builder ~]$ python
Python 3.6.13 (default, Feb 27 2021, 09:33:34)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyrfa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vagrant/venv/lib/python3.6/site-packages/pyrfa/__init__.py", line 7, in <module>
    from pyrfa.pyrfa import *
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
>>>

Can anyone suggest a way around this ?

wiwat-tharateeraparb commented 3 years ago

Try this:

$ scl enable rh-python36 bash