TDengine
TDengine copied to clipboard
python无法导入taos包
Python 3.6.10 taospy 2.4.0 客户端: TDengine-client-3.0.1.2-Linux-x64.tar.gz
py36) [root@dba-yun-monitor ~]# python Python 3.6.10 |Anaconda, Inc.| (default, May 8 2020, 02:54:21) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import taos Traceback (most recent call last): File "
", line 1, in File "/root/anaconda3/envs/py36/lib/python3.6/site-packages/taos/init.py", line 2, in from .connection import TaosConnection File "/root/anaconda3/envs/py36/lib/python3.6/site-packages/taos/connection.py", line 3, in from .cinterface import * File "/root/anaconda3/envs/py36/lib/python3.6/site-packages/taos/cinterface.py", line 330, in _libtaos.taos_subscribe.restype = c_void_p File "/root/anaconda3/envs/py36/lib/python3.6/ctypes/init.py", line 361, in getattr func = self.getitem(name) File "/root/anaconda3/envs/py36/lib/python3.6/ctypes/init.py", line 366, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/libtaos.so: undefined symbol: taos_subscribe
pip install -U taospy
你好, 执行完pip install -U taospy后还是2.4.0版本, 问题还是存在, 是必须要指定某个pip源码?
(py36) [root@dba-yun-monitor tdengine_scripts]# pip install -U taospy WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: taospy in /root/anaconda3/envs/py36/lib/python3.6/site-packages (2.4.0) Collecting taospy Downloading https://pypi.tuna.tsinghua.edu.cn/packages/11/1e/05bec3109cec60ade745c75dea0a5fd16790c4876a62b5b127476d9caeb5/taospy-2.5.2-py3-none-any.whl (62 kB) |████████████████████████████████| 62 kB 19.9 MB/s Requirement already satisfied: pytz in /root/anaconda3/envs/py36/lib/python3.6/site-packages (from taospy) (2019.3) Requirement already satisfied: iso8601==1.0.2 in /root/anaconda3/envs/py36/lib/python3.6/site-packages (from taospy) (1.0.2) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/94/31/7bd710e430be3b832ffe10a4e333176d349c4c4bd502d326dd266f95fac6/taospy-2.5.1-py3-none-any.whl (62 kB) |████████████████████████████████| 62 kB 31.3 MB/s Downloading https://pypi.tuna.tsinghua.edu.cn/packages/08/60/43d0e84fdb9758aafdfb704c1a05d44dbec77358ff58d5411312749e6b4d/taospy-2.5.0-py3-none-any.whl (59 kB) |████████████████████████████████| 59 kB 7.7 MB/s
那就要升级 Python 到 3.7 以后了