The problem that pyodbc cannot be imported in win10 + python3.7 + sqlserver2008r2 + django2.1

In order to link to the sqlserver database for djanog2.1, according to the suggestion of the django official website (see the official link: https://pypi.org/project/django-pyodbc-azure/ ), use the pip install django-pyodbc-azure command to install the necessary components, After installing the latest version of pyodbc, I always encounter the following error message when running the code. The most disgusting thing is that this problem occurs directly when I directly write import pyodbc in the editor. After searching the whole network, Baidu search is over, Search with bing, using various methods can not solve this problem,

Traceback (most recent call last):
  File "C:/Users/Administrator/AppData/Local/Programs/Python/Python37/zzl_test1.py", line 1, in <module>
    import pyodbc
ImportError: DLL load failed: 找不到指定的模块。

Finally, I know the reason: the reason is that the latest version of pyodbc 4.0.28 does not support the problem, and it is solved by replacing it with the first version 4.0.27. I can only say tmd, and the conclusion is that the latest version is not necessarily Is the best, mature is the best

Guess you like

Origin blog.csdn.net/zzl23702811/article/details/103784300