I'm trying to develop a Python script, and I seem to be running into a conflict between two of the libraries that I want to include.
The first dependency that I have is pymoos (https://github.com/msis/python-moos), which is necessary to connect to my communication architecture. I've built the code and manually installed the resultant pymoos.so in the following places:
- /usr/lib/python3.6/site-packages/pymoos.so
- /usr/lib64/python2.7/lib-dynload/pymoos.so
- /usr/lib64/python3.6/lib-dynload/pymoos.so
- /usr/local/lib/python3.7/lib-dynload/pymoos.so
However, only python2.7 will allow me to 'import pymoos' from the interpreter. Attempting from either of the Python3 versions produces this:
Python 3.6.8 (default, Jun 11 2019, 15:15:01) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pymoos Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dynamic module does not define module export function (PyInit_pymoos) The second dependency is pydantic, which I have only managed to install using pip3, apparently meaning that it's only available from either of the versions of Python3 that I have installed. Attempting to import from Python2 gives the following:
Python 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pydantic Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pydantic Since I know where the pymoos.so library is, I think that my easiest path forward is to put that in the right place so it works with python3, but I can't seem to find the right place!
pip install path/to/pymoos/code, but you might be better off using a more widely used database library like asyncpg or psycopg.sudo python3.7 setup.py bdist_wheelandsudo pip3 install dist/pymoos-0.0.1-cp37-cp37m-linux_x86_64.whlIt worked on one computer just fine, I'm having a new problem with the other where it tells me that this and other .whl files "is not a supported wheel on this platform." So I'm tracking that down.