python package install was failed
I found two error when i was installed connector of python.
Error 1:
- The error show installation path
pip install src/connector/python/python3/with documentation from linkhttps://www.taosdata.com/en/documentation/connector/#Python-Connector. - But the actually path is
pip install src/connector/python/windows/python3/from github project.
Error 2:
- The installation with python was failedwhen i use
pip installthat shows successfully installed. - But i use the command
import taos, it shows error below.

我也是这个问题,python3 pip能安装成功,但import taos说找不到模块。python2.7能安装成功,但有个报错,错误如下:

linux no error!
For error 1, the installation path to be chosen depends on what system under which your client will be installed. If you want to install the python client under windows, then the installation path is "src/connector/python/windows/python3/". Otherwise, the you will install the python client under linux.
For error2, can you find the taos.dll under "C:\TDengine\driver"?
For error 1, the installation path to be chosen depends on what system under which your client will be installed. If you want to install the python client under windows, then the installation path is "src/connector/python/windows/python3/". Otherwise, the you will install the python client under linux.
For error2, can you find the taos.dll under "C:\TDengine\driver"?
我有这个文件,还是报错:

Have you also copied the tao.dll to "C:\windows\system32"?
After I copied the "taos.dll" to "C:\Windows\System32", I tried again and the error still exists, and I also restarted my "cmd"..

Your windows is 32bit and our tao.dll is compiled on 64bit system.
Your windows is 32bit and our tao.dll is compiled on 64bit system.
Great ! That's the problem..
Your windows is 32bit and our tao.dll is compiled on 64bit system.
My windows is 64bit, the error still exists.

Your windows is 32bit and our tao.dll is compiled on 64bit system.
My windows is 64bit, the error still exists.
![]()
![]()
I'm confused about your statement "The installation with python was failed" in error 2. Have you succeed after entering "pip install python3"?
Another question, have you copied "tao.dll" to "C:\Windows\System32" and "C:\TDengine\driver"?
Your windows is 32bit and our tao.dll is compiled on 64bit system.
My windows is 64bit, the error still exists.
![]()
![]()
I think there may be two possibilities:
- First:Your source code is not update to date, I updated my code yesterday and reinstalld the lib, and then the problem was solved.
- Second:You've installed the wrong lib. You should use the command "pip install /src/connector/python/windows/python3" to install the lib used under windows system. Now your code is trying to load the lib "libtaos.so" which seems to be used under Linux system..
Your windows is 32bit and our tao.dll is compiled on 64bit system.
My windows is 64bit, the error still exists.
![]()
![]()
I think there may be two possibilities:
- First:Your source code is not update to date, I updated my code yesterday and reinstalld the lib, and then the problem was solved.
- Second:You've installed the wrong lib. You should use the command "pip install /src/connector/python/windows/python3" to install the lib used under windows system. Now your code is trying to load the lib "libtaos.so" which seems to be used under Linux system..
github lastest code is ok!

I found two error when i was installed connector of python.
Error 1:
- The error show installation path
pip install src/connector/python/python3/with documentation from linkhttps://www.taosdata.com/en/documentation/connector/#Python-Connector.- But the actually path is
pip install src/connector/python/windows/python3/from github project.Error 2:
- The installation with python was failedwhen i use
pip installthat shows successfully installed.- But i use the command
import taos, it shows error below.
update github lastest code, run "pip install src\connector\python\windows\python3"
From the screenshot seems that it's a bug in \taos\cinterface.py, that it tries to load a Linux ELF file (libtaos.so) instead of a Windows PE (libtaos.dll --- unless ctypes.CDLL() does the name-conversion job properly). https://user-images.githubusercontent.com/7477494/62337425-2912b080-b507-11e9-8ebe-5ba7a0d1e28b.png
Besides, you guys better install the packages and debug your stuff in a python's virtual environment, and avoid the pollution of the packages over time. There are a few virtual environments and I'd prefer virtualenv :-)
(sudo --- Linux) pip install virtualenv
cd
Also are you using PyCharm? The community edition is free even in office. The best Python IDE on this planet. Try it :-)
Side note: from the screenshot above --- C:\python36\lib\site-packages\ is the global place to store the packages on your machine. Be careful installing stuff to here
我在Windows10上也pip成功了,报同样的错误,只好把代码放到Linux上去运行。 taos.dll不是在开发么?https://github.com/taosdata/TDengine/issues/89
我在Windows10上也pip成功了,报同样的错误

我在安装python连接器时发现了两个错误。
错误1:
- 错误显示安装路径
pip install src/connector/python/python3/以及link中的文档https://www.taosdata.com/en/documentation/connector/#Python-Connector。- 但是实际路径
pip install src/connector/python/windows/python3/来自github项目。错误2:
- 当我使用python进行安装时失败
pip install,表明安装成功。- 但是我使用命令
import taos,它显示下面的错误。
更新github最新代码,运行“ pip install src \ connector \ python \ windows \ python3”
同样的错误,请问您解决这个问题了么
我在安装python连接器时发现了两个错误。
错误1:
- 错误显示安装路径
pip install src/connector/python/python3/以及link中的文档https://www.taosdata.com/en/documentation/connector/#Python-Connector。- 但是实际路径
pip install src/connector/python/windows/python3/来自github项目。错误2:
- 当我使用python进行安装时失败
pip install,表明安装成功。- 但是我使用命令
import taos,它显示下面的错误。
更新github最新代码,运行“ pip install src \ connector \ python \ windows \ python3”
同样的错误,请问您解决这个问题了么
It shows the same error.
>>> import taos
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\site-packages\taos\__init__.py", line 2, in <module>
from .connection import TDengineConnection
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\site-packages\taos\connection.py", line 1, in <module>
from .cursor import TDengineCursor
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\site-packages\taos\cursor.py", line 1, in <module>
from .cinterface import CTaosInterface
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\site-packages\taos\cinterface.py", line 138, in <module>
class CTaosInterface(object):
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\site-packages\taos\cinterface.py", line 140, in CTaosInterface
libtaos = ctypes.windll.LoadLibrary('taos')
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 426, in LoadLibrary
return self._dlltype(name)
File "C:\Users\15627\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。
这个解决方法很简单啊,如果是Windows的话,把taos.dll文件复制一下,在system32和SysWOW64都放一份。 Linux上面也是一样的,在/usr/lib和/usr/lib64下面都放一份taos.so,大概是这样的,时间久了记不太清了。