Im trying to use a lib on bsd that was designed for linux for IBM-db connections:
I have installed as per the ibmdocs for linux, and placed the required linux libs in /compat/linux/lib/
But i get the import error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: Shared object "libdb2.so.1" not found, required by "ibm_db.so"
If I place the file manually in /usr/lib or symlink it I get a read error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libdb2.so.1: Undefined symbol "strcspn"
If anyone could help on this I would be forever grateful!!
I have installed ibm_db and both ibm_db_sa without failure, I just think its more of an issue trying to use the linux app on bsd.
Since it's looking for libraries in /usr/lib, you seem to be running the FreeBSD version of Python.
Since FreeBSD's Linux compatibility is a per process compatibility, you cannot load Linux libraries into a FreeBSD process. If you want to dynamically load Linux libraries, you need to run a Linux version of Python.
Related
I am trying to get gnuradio to work in a virtualenv. I want to keep my system somewhat clean and my project needs Python 3.9, but my system Python is 3.8 (Ubuntu 20.04.4 LTS).
I install it using sudo apt install gnuradio, but then it ends up in the system dist-packages and I can't import it in my virtualenv. The imports work fine when running the system Python.
I have tried to recreate my virtualenv to use system packages:
python3.9 -m venv --system-site-packages venv
This at least made my virtualenv able to find gnuradio, but when I try importing stuff it fails in several different ways.
>>> from gnuradio import uhd
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 21, in _prepare_uhd_python
from . import uhd_python
ImportError: cannot import name 'uhd_python' from partially initialized module 'gnuradio.uhd' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 68, in <module>
_prepare_uhd_python()
File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 26, in _prepare_uhd_python
from . import uhd_python
ImportError: cannot import name 'uhd_python' from partially initialized module 'gnuradio.uhd' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py)
>>> import pmt
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pmt/__init__.py", line 34, in <module>
from .pmt_python import *
ModuleNotFoundError: No module named 'pmt.pmt_python'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pmt/__init__.py", line 38, in <module>
from .pmt_python import *
ModuleNotFoundError: No module named 'pmt.pmt_python'
I have struggled with this for several days now and found no solution. Is it even possible to run GNU Radio from within a virtualenv?
I have struggled with this for several days now and found no solution.
Your distro's GNU Radio package is built against your distro's python, so you can't use it with a different python.
So, this is expected.
Is it even possible to run GNU Radio from within a virtualenv?
Sure, you'd need to build it from that virtualenv as well, and tell cmake -DCMAKE_INSTALL_PREFIX=/path/to/virtualenv/ to install into it.
We have a pretty nice anaconda packager, so installing GNU Radio into a Python prefix using conda might be the easiest alternative to that.
Alternatively:
Ubuntu 20.04.4 LTS
There's a new Ubuntu LTS version out! If you go for a system upgrade to Ubuntu 22.04 LTS, you get Python 3.10, and a current GNU Radio 3.10.1 "for free".
I've gotten my hands on a AIY voice kit v1 and am stuck with the assistant_grpc_demo.py with it failing at an import statement with the grpc. I should have everything installed already, yet google.auth.transport can't seem to find it. I am using a pi 3 A+. Below is the terminal commands I used and their outputs.
pi#raspberrypi:~ $ cat testinput.py
import google.auth.transport.grpc
pi#raspberrypi:~ $ python3 testinput.py
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 30, in <module>
import grpc
File "/home/pi/.local/lib/python3.7/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/home/pi/.local/lib/python3.7/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "testinput.py", line 1, in <module>
import google.auth.transport.grpc
File "/home/pi/.local/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 37, in <module>
caught_exc,
File "<string>", line 3, in raise_from
ImportError: gRPC is not installed, please install the grpcio package to use the gRPC transport.
*Maybe the glibc part is the problem. Not sure how to resolve that as I already have libc6 2.28. Is there a way to get the aiy-python-wheels to work with my set-up or a previous version. Already tried flashing a pre-built official image built on 4-13-2018 with everything set up, though it failed to boot. Trying to download all packages manually. assistant_library_with_button.sh works though.
Not sure how to resolve that as I already have libc6 2.28
The error message says: .../site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so requires GLIBC_2.33.
Your libc6 is too old for that gRPC package to work -- it was compiled on a newer system.
You must either:
get a different gRPC package -- one compiled on and suitable for running on a GLIBC-2.28 (or earlier) based system, or
get a different GLIBC package (2.33 or later).
I have installed pcre with homebrew. However this does not seem to work with this package: python-pcre as it seems like it is missing `jitĀ“.
I tried installing pcre on my own however the guides i could find did not work on macOS Sierra. Does any one have any tips on how i can get this packeage to work on macOS Sierra?
import pcre
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/pcre.py", line 29, in <module>
import _pcre
ImportError: dlopen(/usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so, 2): Symbol not found: _pcre_assign_jit_stack
Referenced from: /usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so
Expected in: flat namespace
in /usr/local/var/pyenv/versions/srf-3.5.2/lib/python3.5/site-packages/_pcre.cpython-35m-darwin.so
When I tried to run mysqldbcopy utility I get the following error.
mysqldbcopy --source=root:root#localhost:3306 \
--destination=root:root#localhost:3306 first:first_copy
Traceback (most recent call last):
File "/usr/bin/mysqldbcopy", line 24, in <module>
from mysql.utilities.common.tools import check_python_version
ImportError: No module named mysql.utilities.common.tools
I have checked that python (2.6) is installed on my machine.
I have installed mysql python connector mentioned at http://dev.mysql.com/downloads/connector/python/
I have installed mysql utilities from
https://dev.mysql.com/downloads/utilities/
I am not sure why I am still getting that error.
I have installed Slycot successfully on other windows machines, but I am running into an error I have not seen before while attempting to install it on my work desktop. My usual procedure is as follows:
Install PythonXY
Download Microsoft Visual C++ 2008 and SP1 using link from http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download and install Slycot from binary provided in http://www.lfd.uci.edu/~gohlke/pythonlibs/
This has worked before, and it appeared to install with no issues, but I get the following error when I try to import slycot:
>>> import slycot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\slycot\__init__.py", line 5, in <module>
from slycot.analysis import ab01nd,ab05md,ab05nd,ab07nd,ab08nd, ab09ad
File "C:\Python27\lib\site-packages\slycot\analysis.py", line 21, in <module>
from slycot import _wrapper
ImportError: DLL load failed: The specified module could not be found.
>>>
I went to the location of the source in thhe site-packages directory and indeed the _wrapper.pyd file is there. Any ideas why it can't find the DLL?
I re-installed PythonXY and followed my original procedure and the installation worked the second time around. I'm chocking it up to humidity issues (-;